diff --git a/capsulflask/db.py b/capsulflask/db.py index a75663f..3e3b94e 100644 --- a/capsulflask/db.py +++ b/capsulflask/db.py @@ -42,7 +42,7 @@ def init_app(app): hasSchemaVersionTable = False actionWasTaken = False schemaVersion = 0 - desiredSchemaVersion = 13 + desiredSchemaVersion = 15 cursor = connection.cursor() diff --git a/capsulflask/schema_migrations/13_down_coreos.sql b/capsulflask/schema_migrations/13_down_coreos.sql new file mode 100644 index 0000000..7ae6ee7 --- /dev/null +++ b/capsulflask/schema_migrations/13_down_coreos.sql @@ -0,0 +1,3 @@ +DELETE FROM os_images WHERE id = 'coreos'; + +UPDATE schemaversion SET version = 12; diff --git a/capsulflask/schema_migrations/13_up_coreos.sql b/capsulflask/schema_migrations/13_up_coreos.sql new file mode 100644 index 0000000..5d8928c --- /dev/null +++ b/capsulflask/schema_migrations/13_up_coreos.sql @@ -0,0 +1,4 @@ +INSERT INTO os_images (id, template_image_file_name, description, deprecated) +VALUES ('coreos', 'coreos/stable/root.img.qcow2', 'Fedora CoreOS Stable', FALSE); + +UPDATE schemaversion SET version = 13; diff --git a/capsulflask/schema_migrations/14_down_coreos_notready.sql b/capsulflask/schema_migrations/14_down_coreos_notready.sql new file mode 100644 index 0000000..0edd12b --- /dev/null +++ b/capsulflask/schema_migrations/14_down_coreos_notready.sql @@ -0,0 +1,3 @@ +UPDATE os_images SET deprecated = FALSE WHERE id = 'coreos'; + +UPDATE schemaversion SET version = 13; diff --git a/capsulflask/schema_migrations/14_up_cores_notready.sql b/capsulflask/schema_migrations/14_up_cores_notready.sql new file mode 100644 index 0000000..539d09c --- /dev/null +++ b/capsulflask/schema_migrations/14_up_cores_notready.sql @@ -0,0 +1,3 @@ +UPDATE os_images SET deprecated = TRUE WHERE id = 'coreos'; + +UPDATE schemaversion SET version = 14; diff --git a/capsulflask/schema_migrations/13_down_introduce_hosts.sql b/capsulflask/schema_migrations/15_down_introduce_hosts.sql similarity index 100% rename from capsulflask/schema_migrations/13_down_introduce_hosts.sql rename to capsulflask/schema_migrations/15_down_introduce_hosts.sql diff --git a/capsulflask/schema_migrations/13_up_introduce_hosts.sql b/capsulflask/schema_migrations/15_up_introduce_hosts.sql similarity index 100% rename from capsulflask/schema_migrations/13_up_introduce_hosts.sql rename to capsulflask/schema_migrations/15_up_introduce_hosts.sql