From a040301bbb9a2f7a4ebe791953e33d6abfbd3194 Mon Sep 17 00:00:00 2001 From: j3s Date: Sun, 25 Jul 2021 09:33:32 -0500 Subject: [PATCH] Add archlinux, bump everything' --- capsulflask/db.py | 2 +- capsulflask/schema_migrations/19_down_os_updates.sql | 6 ++++++ capsulflask/schema_migrations/19_up_os_updates.sql | 10 ++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 capsulflask/schema_migrations/19_down_os_updates.sql create mode 100644 capsulflask/schema_migrations/19_up_os_updates.sql diff --git a/capsulflask/db.py b/capsulflask/db.py index a39bd66..c439eaf 100644 --- a/capsulflask/db.py +++ b/capsulflask/db.py @@ -43,7 +43,7 @@ def init_app(app, is_running_server): hasSchemaVersionTable = False actionWasTaken = False schemaVersion = 0 - desiredSchemaVersion = 18 + desiredSchemaVersion = 19 cursor = connection.cursor() diff --git a/capsulflask/schema_migrations/19_down_os_updates.sql b/capsulflask/schema_migrations/19_down_os_updates.sql new file mode 100644 index 0000000..9598409 --- /dev/null +++ b/capsulflask/schema_migrations/19_down_os_updates.sql @@ -0,0 +1,6 @@ +DELETE FROM os_images WHERE id = 'guixsystem130'; +DELETE FROM os_images WHERE id = 'archlinux'; +UPDATE os_images SET deprecated = FALSE WHERE id = 'guixsystem120'; +UPDATE os_images SET description = 'Ubuntu 20.04 LTS (Fossa)' WHERE id = 'ubuntu20'; + +UPDATE schemaversion SET version = 18; diff --git a/capsulflask/schema_migrations/19_up_os_updates.sql b/capsulflask/schema_migrations/19_up_os_updates.sql new file mode 100644 index 0000000..4237e4a --- /dev/null +++ b/capsulflask/schema_migrations/19_up_os_updates.sql @@ -0,0 +1,10 @@ +INSERT INTO os_images (id, template_image_file_name, description, deprecated) +VALUES ('guixsystem130', 'guixsystem/1.3.0/root.img.qcow2', 'Guix System 1.3.0', FALSE); +INSERT INTO os_images (id, template_image_file_name, description, deprecated) +VALUES ('archlinux', 'archlinux/root.img.qcow2', 'Arch Linux', FALSE); + +UPDATE os_images SET deprecated = TRUE WHERE id = 'guixsystem120'; +UPDATE os_images SET description = 'Ubuntu 20.04 (Focal)' WHERE id = 'ubuntu20'; + + +UPDATE schemaversion SET version = 19;