Browse Source

Update debian, alpine, add rockylinux

pull/27/head
j3s 7 months ago
parent
commit
22e877dc3d
  1. 2
      capsulflask/db.py
  2. 8
      capsulflask/schema_migrations/22_down_os_updates.sql
  3. 13
      capsulflask/schema_migrations/22_up_os_updates.sql

2
capsulflask/db.py

@ -50,7 +50,7 @@ def init_app(app, is_running_server):
hasSchemaVersionTable = False
actionWasTaken = False
schemaVersion = 0
desiredSchemaVersion = 21
desiredSchemaVersion = 22
cursor = connection.cursor()

8
capsulflask/schema_migrations/22_down_os_updates.sql

@ -0,0 +1,8 @@
DELETE FROM os_images WHERE id = 'rockylinux';
DELETE FROM os_images WHERE id = 'alpine315';
DELETE FROM os_images WHERE id = 'debian11';
UPDATE os_images SET deprecated = FALSE WHERE id = 'debian10';
UPDATE os_images SET deprecated = FALSE WHERE id = 'alpine313';
UPDATE schemaversion SET version = 21;

13
capsulflask/schema_migrations/22_up_os_updates.sql

@ -0,0 +1,13 @@
INSERT INTO os_images (id, template_image_file_name, description, deprecated)
VALUES ('rockylinux', 'rockylinux/8/root.img.qcow2', 'Rocky Linux 8', FALSE);
INSERT INTO os_images (id, template_image_file_name, description, deprecated)
VALUES ('alpine315', 'alpine/3.15/root.img.qcow2', 'Alpine Linux 3.15', FALSE);
INSERT INTO os_images (id, template_image_file_name, description, deprecated)
VALUES ('debian11', 'debian/11/root.img.qcow2', 'Debian 11 (bullseye)', FALSE);
UPDATE os_images SET deprecated = TRUE WHERE id = 'debian10';
UPDATE os_images SET deprecated = TRUE WHERE id = 'alpine313';
UPDATE schemaversion SET version = 22;
Loading…
Cancel
Save