Skip to content

Commit 607a5c4

Browse files
authored
Add BLSamplePosition table (#272)
New table BLSamplePosition with FK to BLSample, posX, posY, posZ, recordTimeStamp and positionType enum
1 parent 6d1c3c9 commit 607a5c4

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
INSERT IGNORE INTO SchemaStatus (scriptName, schemaStatus) VALUES ('2025_05_01_BLSamplePosition.sql', 'ONGOING');
2+
3+
ALTER TABLE Position
4+
DROP CONSTRAINT IF EXISTS Position_fk_blSampleId,
5+
DROP IF EXISTS positionType,
6+
DROP IF EXISTS blSampleId;
7+
8+
CREATE TABLE `BLSamplePosition` (
9+
`positionId` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key (auto-incremented)',
10+
`blSampleId` int(11) unsigned NOT NULL COMMENT 'FK, references parent sample',
11+
`posX` double DEFAULT NULL,
12+
`posY` double DEFAULT NULL,
13+
`posZ` double DEFAULT NULL,
14+
`recordTimeStamp` datetime DEFAULT NULL COMMENT 'Creation or last update date/time',
15+
`positionType` enum('dispensing') COMMENT 'Type of marked position (e.g.: dispensing location)',
16+
PRIMARY KEY (`positionId`),
17+
CONSTRAINT `BLSamplePosition_fk_blSampleId` FOREIGN KEY (`blSampleId`) REFERENCES `BLSample` (`blSampleId`)
18+
);
19+
20+
UPDATE SchemaStatus SET schemaStatus = 'DONE' WHERE scriptName = '2025_05_01_BLSamplePosition.sql';

0 commit comments

Comments
 (0)