Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions schemas/ispyb/updates/2022_06_28_sampleimage_positioner.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
INSERT IGNORE INTO SchemaStatus (scriptName, schemaStatus) VALUES ('2022_06_28_sampleimage_positioner.sql', 'ONGOING');

CREATE TABLE `BLSampleImage_has_Positioner` (
`blSampleImageHasPositionerId` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`blSampleImageId` INT UNSIGNED NOT NULL,
`positionerId` INT UNSIGNED NOT NULL,
`value` float COMMENT 'The position of this positioner for this blsampleimage',
PRIMARY KEY (`blSampleImageHasPositionerId`),
CONSTRAINT `BLSampleImageHasPositioner_ibfk1`
FOREIGN KEY (`blSampleImageId`)
REFERENCES `BLSampleImage`(`blSampleImageId`),
CONSTRAINT `BLSampleImageHasPositioner_ibfk2`
FOREIGN KEY (`positionerId`)
REFERENCES `Positioner`(`positionerId`)
) ENGINE=InnoDB COMMENT='Allows a BLSampleImage to store motor positions along with the image';

UPDATE SchemaStatus SET schemaStatus = 'DONE' WHERE scriptName = '2022_06_28_sampleimage_positioner.sql';