diff --git a/capsulflask/db.py b/capsulflask/db.py index fd0e814..72b3930 100644 --- a/capsulflask/db.py +++ b/capsulflask/db.py @@ -50,7 +50,7 @@ def init_app(app, is_running_server): hasSchemaVersionTable = False actionWasTaken = False schemaVersion = 0 - desiredSchemaVersion = 24 + desiredSchemaVersion = 25 cursor = connection.cursor() diff --git a/capsulflask/schema_migrations/25_down_nixos.sql b/capsulflask/schema_migrations/25_down_nixos.sql new file mode 100644 index 0000000..27b3b6d --- /dev/null +++ b/capsulflask/schema_migrations/25_down_nixos.sql @@ -0,0 +1,3 @@ +DELETE FROM os_images WHERE id = 'nixos'; + +UPDATE schemaversion SET version = 24; diff --git a/capsulflask/schema_migrations/25_up_nixos.sql b/capsulflask/schema_migrations/25_up_nixos.sql new file mode 100644 index 0000000..5120282 --- /dev/null +++ b/capsulflask/schema_migrations/25_up_nixos.sql @@ -0,0 +1,4 @@ +INSERT INTO os_images (id, template_image_file_name, description, deprecated) +VALUES ('nixos', 'nixos/22.05/root.img.qcow2', 'NixOS 22.05', FALSE); + +UPDATE schemaversion SET version = 25;