Skip to content
Merged
Show file tree
Hide file tree
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
40 changes: 40 additions & 0 deletions schemas/ispyb/updates/2025_11_03_LaserParameters_tables.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
-- To undo:
-- drop table LaserPoint;
-- drop table LaserParameters;
-- delete from SchemaStatus where scriptName = '2025_11_03_LaserParameters_tables.sql';


INSERT IGNORE INTO SchemaStatus (scriptName, schemaStatus) VALUES ('2025_11_03_LaserParameters_tables.sql', 'ONGOING');

CREATE TABLE LaserParameters (
laserParametersId int(11) unsigned PRIMARY KEY AUTO_INCREMENT,
robotActionId int(11) unsigned,
laserRepetitionRate float COMMENT 'Laser repetition rate, in kHz',
scanheadMoveSpeed float COMMENT 'Scanhead move speed, in m/s',
laserTransmission float COMMENT 'Laser transmission, in %',
numberOfPasses int(10) unsigned,
gonioRotationSpeed int(10) COMMENT 'Goniometer rotation speed, in deg/s',
totalMarkingTime float COMMENT 'Total marking time, in s',
CONSTRAINT `LaserParameters_fk_robotActionId`
FOREIGN KEY (robotActionId)
REFERENCES RobotAction (robotActionId)
ON DELETE CASCADE
ON UPDATE CASCADE
) COMMENT = 'Laser parameters';

CREATE TABLE LaserPoint (
laserPointId int(11) unsigned PRIMARY KEY AUTO_INCREMENT,
laserParametersId int(11) unsigned,
x int(10) unsigned NOT NULL COMMENT 'X coordinate of point, in microns',
y int(10) unsigned NOT NULL COMMENT 'Y coordinate of point, in microns',
pointIndex int(10) NOT NULL COMMENT 'Index of point, expresses ordinality',
radius int(10) unsigned COMMENT 'Radius of point, in microns',
laserOn tinyint(1) DEFAULT 0,
CONSTRAINT LaserPoint_fk_laserParametersId
FOREIGN KEY (laserParametersId)
REFERENCES LaserParameters (laserParametersId)
ON DELETE CASCADE
ON UPDATE CASCADE
) COMMENT = 'Laser points';

UPDATE SchemaStatus SET schemaStatus = 'DONE' WHERE scriptName = '2025_11_03_LaserParameters_tables.sql';
5 changes: 5 additions & 0 deletions schemas/ispyb/updates/2025_11_05_RobotAction_new_type.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
INSERT IGNORE INTO SchemaStatus (scriptName, schemaStatus) VALUES ('2025_11_05_RobotAction_new_type.sql', 'ONGOING');

ALTER TABLE RobotAction MODIFY COLUMN actionType ENUM('LOAD', 'UNLOAD', 'DISPOSE', 'STORE', 'WASH', 'ANNEAL', 'MOSAIC', 'LASER');

UPDATE SchemaStatus SET schemaStatus = 'DONE' WHERE scriptName = '2025_11_05_RobotAction_new_type.sql';