From 74621a85dd8cf0568618b530ba870f82278e6c5a Mon Sep 17 00:00:00 2001 From: j3s Date: Thu, 14 Jan 2021 21:31:38 -0600 Subject: [PATCH] Add guixsystem 1.2.0 to capsul --- capsulflask/db.py | 2 +- capsulflask/schema_migrations/10_down_guixsystem1.2.0.sql | 3 +++ capsulflask/schema_migrations/10_up_guixsystem1.2.0.sql | 4 ++++ capsulflask/templates/changelog.html | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 capsulflask/schema_migrations/10_down_guixsystem1.2.0.sql create mode 100644 capsulflask/schema_migrations/10_up_guixsystem1.2.0.sql diff --git a/capsulflask/db.py b/capsulflask/db.py index 9d5fde9..11d60cb 100644 --- a/capsulflask/db.py +++ b/capsulflask/db.py @@ -40,7 +40,7 @@ def init_app(app): hasSchemaVersionTable = False actionWasTaken = False schemaVersion = 0 - desiredSchemaVersion = 9 + desiredSchemaVersion = 10 cursor = connection.cursor() diff --git a/capsulflask/schema_migrations/10_down_guixsystem1.2.0.sql b/capsulflask/schema_migrations/10_down_guixsystem1.2.0.sql new file mode 100644 index 0000000..04bec59 --- /dev/null +++ b/capsulflask/schema_migrations/10_down_guixsystem1.2.0.sql @@ -0,0 +1,3 @@ +DELETE FROM os_images WHERE id = 'guixsystem120'; + +UPDATE schemaversion SET version = 9; diff --git a/capsulflask/schema_migrations/10_up_guixsystem1.2.0.sql b/capsulflask/schema_migrations/10_up_guixsystem1.2.0.sql new file mode 100644 index 0000000..76be19a --- /dev/null +++ b/capsulflask/schema_migrations/10_up_guixsystem1.2.0.sql @@ -0,0 +1,4 @@ +INSERT INTO os_images (id, template_image_file_name, description, deprecated) +VALUES ('guixsystem120', 'guixsystem/1.2.0/root.img.qcow2', 'Guix System 1.2.0', FALSE); + +UPDATE schemaversion SET version = 10; diff --git a/capsulflask/templates/changelog.html b/capsulflask/templates/changelog.html index 6615055..5b8dea4 100644 --- a/capsulflask/templates/changelog.html +++ b/capsulflask/templates/changelog.html @@ -8,6 +8,7 @@ {% block subcontent %}