Merge branch 'develop' into event_signing

This commit is contained in:
Mark Haines 2014-10-27 11:14:11 +00:00
commit acb2d171e8
42 changed files with 458 additions and 5581 deletions

View file

@ -70,7 +70,7 @@ SCHEMAS = [
# Remember to update this number every time an incompatible change is made to
# database schema files, so the users will be informed on server restarts.
SCHEMA_VERSION = 5
SCHEMA_VERSION = 6
class _RollbackButIsFineException(Exception):
@ -487,10 +487,11 @@ def prepare_database(db_conn):
db_conn.commit()
else:
sql_script = "BEGIN TRANSACTION;"
for sql_loc in SCHEMAS:
sql_script = read_schema(sql_loc)
c.executescript(sql_script)
sql_script += read_schema(sql_loc)
sql_script += "COMMIT TRANSACTION;"
c.executescript(sql_script)
db_conn.commit()
c.execute("PRAGMA user_version = %d" % SCHEMA_VERSION)