Skip to content

Commit 6d1c3c9

Browse files
authored
Add blSampleId FK col in XrayCentringResult which is the actual sample to which the result belongs (#271)
1 parent e28ef44 commit 6d1c3c9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
INSERT IGNORE INTO SchemaStatus (scriptName, schemaStatus) VALUES ('2025_05_01_XrayCentringResult_fk_blSampleId.sql', 'ONGOING');
2+
3+
ALTER TABLE XrayCentringResult
4+
ADD blSampleId int(11) unsigned COMMENT 'The BLSample attributed for this x-ray centring result, i.e. the actual sample even for multi-pins',
5+
ADD CONSTRAINT XrayCentringResult_fk_blSampleId
6+
FOREIGN KEY (blSampleId)
7+
REFERENCES BLSample(blSampleId)
8+
ON DELETE SET NULL
9+
ON UPDATE CASCADE;
10+
11+
UPDATE SchemaStatus SET schemaStatus = 'DONE' WHERE scriptName = '2025_05_01_XrayCentringResult_fk_blSampleId.sql';

0 commit comments

Comments
 (0)