From af16ef89d16399291c52e35d91378ae0a0a23912 Mon Sep 17 00:00:00 2001 From: forest Date: Tue, 19 May 2020 22:55:23 -0500 Subject: [PATCH] add deprecated column for os_images --- capsulflask/schema_migrations/03_down_openbsd67.sql | 4 ++++ capsulflask/schema_migrations/03_up_openbsd67.sql | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 capsulflask/schema_migrations/03_down_openbsd67.sql 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