Remove hardcoded database version from session sql statement

This commit is contained in:
Lonami Exo 2017-12-29 00:43:52 +01:00
parent 47b53ce89f
commit 0570c55120

View File

@ -107,6 +107,7 @@ class Session:
else:
# Tables don't exist, create new ones
c.execute("create table version (version integer)")
c.execute("insert into version values (?)", (CURRENT_VERSION,))
c.execute(
"""create table sessions (
dc_id integer primary key,
@ -124,7 +125,6 @@ class Session:
name text
) without rowid"""
)
c.execute("insert into version values (1)")
# Migrating from JSON -> new table and may have entities
if entities:
c.executemany(