From 39f1349deca09738b5c4a1a0d6ff10c1f956f6bf Mon Sep 17 00:00:00 2001 From: Peter Corbett Date: Mon, 1 Jul 2024 18:57:44 -0500 Subject: [PATCH] Bump schema to 26: Update Ubuntu and Rocky image versions --- capsulflask/db.py | 2 +- capsulflask/schema_migrations/26_down_os_updates.sql | 5 +++++ capsulflask/schema_migrations/26_up_os_updates.sql | 7 +++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 capsulflask/schema_migrations/26_down_os_updates.sql create mode 100644 capsulflask/schema_migrations/26_up_os_updates.sql diff --git a/capsulflask/db.py b/capsulflask/db.py index 0fbf1ce..2d973ce 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 = 25 + desiredSchemaVersion = 26 cursor = connection.cursor() diff --git a/capsulflask/schema_migrations/26_down_os_updates.sql b/capsulflask/schema_migrations/26_down_os_updates.sql new file mode 100644 index 0000000..390eb33 --- /dev/null +++ b/capsulflask/schema_migrations/26_down_os_updates.sql @@ -0,0 +1,5 @@ + +DELETE FROM os_images WHERE id = 'rockylinux9'; +DELETE FROM os_images WHERE id = 'ubuntu2404'; + +UPDATE schemaversion SET version = 25; diff --git a/capsulflask/schema_migrations/26_up_os_updates.sql b/capsulflask/schema_migrations/26_up_os_updates.sql new file mode 100644 index 0000000..a260dbc --- /dev/null +++ b/capsulflask/schema_migrations/26_up_os_updates.sql @@ -0,0 +1,7 @@ + +INSERT INTO os_images (id, template_image_file_name, description, deprecated) +VALUES ('rockylinux9', 'rocky/9/root.img.qcow2', 'Rocky Linux 9', FALSE); +INSERT INTO os_images (id, template_image_file_name, description, deprecated) +VALUES ('ubuntu2204', 'ubuntu/22.04/root.img.qcow2', 'Ubuntu Linux 24.04', FALSE); + +UPDATE schemaversion SET version = 26; -- 2.45.2