DB-API: separate dbapi init from sql init

This commit is contained in:
Doug Blank 2016-04-15 08:54:18 -04:00
parent 29a5d9dbe7
commit ce33e7509c

View File

@ -73,7 +73,12 @@ class DBAPI(DbGeneric):
exec(code, globals(), default_settings)
self.dbapi = default_settings["dbapi"]
self.update_schema()
def update_schema(self):
"""
Create and update schema.
"""
# make sure schema is up to date:
self.dbapi.try_execute("""CREATE TABLE person (
handle VARCHAR(50) PRIMARY KEY NOT NULL,