Skip to content

Commit

Permalink
Extra file columns for EM tomo
Browse files Browse the repository at this point in the history
  • Loading branch information
KarlLevik committed Jan 16, 2023
1 parent aa6380c commit dab2399
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions schemas/ispyb/updates/2023_01_16_Tomogram_new_cols.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
INSERT IGNORE INTO SchemaStatus (scriptName, schemaStatus) VALUES ('2023_01_16_Tomogram_new_cols.sql', 'ONGOING');

ALTER TABLE Tomogram
ADD fileDirectory varchar(255) DEFAULT NULL COMMENT 'Directory path for files referenced by this table',
ADD centralSliceImage varchar(255) DEFAULT NULL COMMENT 'Tomogram central slice file',
ADD tomogramMovie varchar(255) DEFAULT NULL COMMENT 'Movie traversing the tomogram across an axis',
ADD xyShiftPlot varchar(255) DEFAULT NULL COMMENT 'XY shift plot file',
ADD projXY varchar(255) DEFAULT NULL COMMENT 'XY projection file',
ADD projXZ varchar(255) DEFAULT NULL COMMENT 'XZ projection file',
ADD processingJobId int(11) unsigned DEFAULT NULL,
ADD recordTimeStamp datetime DEFAULT current_timestamp() COMMENT 'Creation or last update date/time',
ADD CONSTRAINT Tomogram_fk_processingJobId FOREIGN KEY (processingJobId) REFERENCES ProcessingJob (processingJobId);

/*
-- Undo changes
ALTER TABLE Tomogram
DROP IF EXISTS fileDirectory,
DROP IF EXISTS centralSliceImage,
DROP IF EXISTS tomogramMovie,
DROP IF EXISTS xyShiftPlot,
DROP IF EXISTS projXY,
DROP IF EXISTS projXZ,
DROP IF EXISTS processingJobId,
DROP IF EXISTS recordTimeStamp,
DROP CONSTRAINT IF EXISTS Tomogram_FK_processingJobId;
*/

UPDATE SchemaStatus SET schemaStatus = 'DONE' WHERE scriptName = '2023_01_16_Tomogram_new_cols.sql';

0 comments on commit dab2399

Please sign in to comment.