diff --git a/capsulflask/db.py b/capsulflask/db.py index 3d40b34..8910621 100644 --- a/capsulflask/db.py +++ b/capsulflask/db.py @@ -40,7 +40,7 @@ def init_app(app): hasSchemaVersionTable = False actionWasTaken = False schemaVersion = 0 - desiredSchemaVersion = 2 + desiredSchemaVersion = 3 cursor = connection.cursor() @@ -127,4 +127,4 @@ def close_db(e=None): current_app.config['PSYCOPG2_CONNECTION_POOL'].putconn(db_model.connection) def my_exec_info_message(exec_info): - return "{}: {}".format(".".join([exec_info[0].__module__, exec_info[0].__name__]), exec_info[1]) \ No newline at end of file + return "{}: {}".format(".".join([exec_info[0].__module__, exec_info[0].__name__]), exec_info[1]) diff --git a/capsulflask/schema_migrations/03_down_openbsd67.sql b/capsulflask/schema_migrations/03_down_openbsd67.sql deleted file mode 100644 index b447d4e..0000000 --- a/capsulflask/schema_migrations/03_down_openbsd67.sql +++ /dev/null @@ -1,3 +0,0 @@ -UPDATE os_images SET id = 'openbsd66' WHERE id = 'openbsd67' -UPDATE os_images SET template_image_file_name = 'openbsd-cloud-2020-05.qcow2' WHERE id = 'openbsd66' -UPDATE os_images SET description = 'OpenBSD 6.6' WHERE id = 'openbsd66' diff --git a/capsulflask/schema_migrations/03_up_openbsd67.sql b/capsulflask/schema_migrations/03_up_openbsd67.sql index 078dd5b..0195cd9 100644 --- a/capsulflask/schema_migrations/03_up_openbsd67.sql +++ b/capsulflask/schema_migrations/03_up_openbsd67.sql @@ -1,3 +1,2 @@ -UPDATE os_images SET id = 'openbsd67' WHERE id = 'openbsd66' -UPDATE os_images SET template_image_file_name = 'openbsd-6.7-x86_64.qcow2' WHERE id = 'openbsd67' -UPDATE os_images SET description = 'OpenBSD 6.7' WHERE id = 'openbsd67' +INSERT INTO os_images (id, template_image_file_name, description) +VALUES ('openbsd67', 'openbsd-6.7-x86_64.qcow2', 'OpenBSD 6.7');