This commit is contained in:
dosangyoon
2022-07-31 17:07:29 +09:00
parent cddcdf4f35
commit 5b5e2196c1
8 changed files with 502 additions and 62 deletions

View File

@@ -14,10 +14,10 @@ class DBManager:
cursor = conn.cursor()
# 테이블 생성
cursor.execute("CREATE TABLE IF NOT EXISTS " + tableName + " (CODE text, NAME text, ymd text, hms text, close REAL, open REAL, high REAL, low REAL, volume REAL, type INTEGER)")
cursor.execute("CREATE TABLE IF NOT EXISTS " + tableName + " (CODE text, NAME text, ymd text, hms text, close REAL, open REAL, high REAL, low REAL, volume REAL, label INTEGER)")
# 키 생성
create_key = "CREATE INDEX IF NOT EXISTS " + tableName + "_idx on " + tableName + " (CODE, ymd, hms, type) "
create_key = "CREATE INDEX IF NOT EXISTS " + tableName + "_idx on " + tableName + " (CODE, ymd, hms, label) "
cursor.execute(create_key)
conn.commit()