diff --git a/capsulflask/schema_migrations/06_down_images_migration.sql b/capsulflask/schema_migrations/06_down_images_migration.sql new file mode 100644 index 0000000..29888fe --- /dev/null +++ b/capsulflask/schema_migrations/06_down_images_migration.sql @@ -0,0 +1,9 @@ +UPDATE os_images SET deprecated = FALSE WHERE id = 'ubuntu18'; +DELETE FROM os_images WHERE id = 'ubuntu20'; +UPDATE os_images SET template_image_file_name = 'alpine-cloud-2020-04-18.qcow2' WHERE id = 'alpine311'; +UPDATE os_images SET template_image_file_name = 'openbsd-6.7-x86_64.qcow2' WHERE id = 'openbsd67'; +UPDATE os_images SET template_image_file_name = 'debian-10-genericcloud-amd64-20191117-80.qcow2' WHERE id = 'debian10'; +UPDATE os_images SET template_image_file_name = 'CentOS-7-x86_64-GenericCloud.qcow2' WHERE id = 'centos7'; +UPDATE os_images SET template_image_file_name = 'CentOS-8-GenericCloud-8.1.1911-20200113.3.x86_64.qcow2' WHERE id = 'centos8'; + +UPDATE schemaversion SET version = 5; diff --git a/capsulflask/schema_migrations/06_up_images_migration.sql b/capsulflask/schema_migrations/06_up_images_migration.sql new file mode 100644 index 0000000..224f7ec --- /dev/null +++ b/capsulflask/schema_migrations/06_up_images_migration.sql @@ -0,0 +1,9 @@ +UPDATE os_images SET deprecated = TRUE WHERE id = 'ubuntu18'; +INSERT INTO os_images (id, template_image_file_name, description, deprecated) VALUES ('ubuntu20', 'ubuntu20.img', 'Ubuntu 20.04 LTS (Fossa)', FALSE); +UPDATE os_images SET template_image_file_name = 'alpine311.img' WHERE id = 'alpine311'; +UPDATE os_images SET template_image_file_name = 'openbsd67.img' WHERE id = 'openbsd67'; +UPDATE os_images SET template_image_file_name = 'debian10.img' WHERE id = 'debian10'; +UPDATE os_images SET template_image_file_name = 'centos7.img' WHERE id = 'centos7'; +UPDATE os_images SET template_image_file_name = 'centos8.img' WHERE id = 'centos8'; + +UPDATE schemaversion SET version = 6;