From 93121c7ef4bc61087480851711961d091aef45e1 Mon Sep 17 00:00:00 2001 From: Guilherme de Freitas Date: Mon, 3 Nov 2025 14:05:45 +0000 Subject: [PATCH 1/2] Add laser parameters tables --- .../2025_11_03_LaserParameters_tables.sql | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 schemas/ispyb/updates/2025_11_03_LaserParameters_tables.sql diff --git a/schemas/ispyb/updates/2025_11_03_LaserParameters_tables.sql b/schemas/ispyb/updates/2025_11_03_LaserParameters_tables.sql new file mode 100644 index 0000000..24d24a3 --- /dev/null +++ b/schemas/ispyb/updates/2025_11_03_LaserParameters_tables.sql @@ -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'; From 51946a1841ee9c6bdf1bafd3d20ee4c9f5f7a95c Mon Sep 17 00:00:00 2001 From: Guilherme de Freitas Date: Wed, 5 Nov 2025 11:36:08 +0000 Subject: [PATCH 2/2] Add enum value to RobotAction actionType --- schemas/ispyb/updates/2025_11_05_RobotAction_new_type.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 schemas/ispyb/updates/2025_11_05_RobotAction_new_type.sql diff --git a/schemas/ispyb/updates/2025_11_05_RobotAction_new_type.sql b/schemas/ispyb/updates/2025_11_05_RobotAction_new_type.sql new file mode 100644 index 0000000..ce09f26 --- /dev/null +++ b/schemas/ispyb/updates/2025_11_05_RobotAction_new_type.sql @@ -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';