From 799c009028da6152f06e01e9250747395a074cc6 Mon Sep 17 00:00:00 2001 From: KarlLevik Date: Wed, 4 Dec 2024 12:38:22 +0000 Subject: [PATCH] Add new boolean column "deleted" to the AutoProcProgramAttachment table --- .../2024_12_04_AutoProcProgramAttachment_deleted.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 schemas/ispyb/updates/2024_12_04_AutoProcProgramAttachment_deleted.sql diff --git a/schemas/ispyb/updates/2024_12_04_AutoProcProgramAttachment_deleted.sql b/schemas/ispyb/updates/2024_12_04_AutoProcProgramAttachment_deleted.sql new file mode 100644 index 00000000..f58b535d --- /dev/null +++ b/schemas/ispyb/updates/2024_12_04_AutoProcProgramAttachment_deleted.sql @@ -0,0 +1,8 @@ +-- To undo: +-- ALTER TABLE AutoProcProgramAttachment DROP deleted, ALGORITHM=INSTANT; + +INSERT IGNORE INTO SchemaStatus (scriptName, schemaStatus) VALUES ('2024_12_04_AutoProcProgramAttachment_deleted.sql', 'ONGOING'); + +ALTER TABLE AutoProcProgramAttachment ADD deleted boolean DEFAULT FALSE COMMENT '1/TRUE if the file has been deleted', ALGORITHM=INSTANT; + +UPDATE SchemaStatus SET schemaStatus = 'DONE' WHERE scriptName = '2024_12_04_AutoProcProgramAttachment_deleted.sql';