diff --git a/capsulflask/schema_migrations/03_down_openbsd67.sql b/capsulflask/schema_migrations/03_down_openbsd67.sql new file mode 100644 index 0000000..94e2b80 --- /dev/null +++ b/capsulflask/schema_migrations/03_down_openbsd67.sql @@ -0,0 +1,4 @@ +DELETE FROM os_images WHERE id = 'openbsd67'; + +ALTER TABLE os_images +DROP COLUMN deprecated; \ No newline at end of file diff --git a/capsulflask/schema_migrations/03_up_openbsd67.sql b/capsulflask/schema_migrations/03_up_openbsd67.sql index 0195cd9..ea9de14 100644 --- a/capsulflask/schema_migrations/03_up_openbsd67.sql +++ b/capsulflask/schema_migrations/03_up_openbsd67.sql @@ -1,2 +1,7 @@ -INSERT INTO os_images (id, template_image_file_name, description) -VALUES ('openbsd67', 'openbsd-6.7-x86_64.qcow2', 'OpenBSD 6.7'); +ALTER TABLE os_images +ADD COLUMN deprecated BOOLEAN NOT NULL DEFAULT FALSE; + +INSERT INTO os_images (id, template_image_file_name, description, deprecated) +VALUES ('openbsd67', 'openbsd-6.7-x86_64.qcow2', 'OpenBSD 6.7', FALSE); + +UPDATE os_images SET deprecated = TRUE WHERE id = 'openbsd66'; \ No newline at end of file