Only create default json table if it's not defined in dbschema

This commit is contained in:
shortcutme 2018-11-21 03:31:12 +01:00
parent 8a17fe927f
commit 4195a72621
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -180,7 +180,8 @@ class Db(object):
if changed:
changed_tables.append("keyvalue")
# Check json table
# Create json table if no custom one defined
if "json" not in self.schema.get("tables", {}):
if self.schema["version"] == 1:
changed = cur.needTable("json", [
["json_id", "INTEGER PRIMARY KEY AUTOINCREMENT"],