Unverified Commit d68412e7 authored by Mael Gaonach's avatar Mael Gaonach
Browse files

v3

parent 867b1ba2
ALTER TABLE
`DataCollection`
ADD
`sequenceId` int(11) unsigned DEFAULT NULL,
ADD
DROP TABLE IF EXISTS `SampleComponent`;
DROP TABLE IF EXISTS `SequenceEvent`;
DROP TABLE IF EXISTS `Sequence`;
DROP TABLE IF EXISTS `SSXDataCollection`;
CREATE TABLE `SSXDataCollection`(
`ssxDataCollectionId` int(11) unsigned PRIMARY KEY AUTO_INCREMENT,
`dataCollectionId` int(11) unsigned NOT NULL,
`repetitionRate` float DEFAULT NULL,
ADD
`energyBandwidth` float DEFAULT NULL,
ADD
`monoStripe` varchar(255) DEFAULT NULL,
ADD
FOREIGN KEY (`sequenceId`) REFERENCES `Sequence`(`sequenceId`);
`jetSpeed` float DEFAULT NULL,
`chipPattern` varchar(255) DEFAULT NULL,
`chipModel` varchar(255) DEFAULT NULL,
`ligandMixingTime` datetime DEFAULT NULL,
`ligandMixingDuration` float DEFAULT NULL,
FOREIGN KEY (`dataCollectionId`) REFERENCES `DataCollection`(`dataCollectionId`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 0 DEFAULT CHARSET = utf8mb4;
ALTER TABLE
`DataCollectionGroup`
......@@ -35,21 +44,39 @@ MODIFY
CREATE TABLE `Sequence` (
`sequenceId` int(11) unsigned PRIMARY KEY AUTO_INCREMENT,
`dataCollectionId` int(11) unsigned NOT NULL,
`name` varchar(255) DEFAULT NULL,
);
FOREIGN KEY (`dataCollectionId`) REFERENCES `DataCollection`(`dataCollectionId`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 0 DEFAULT CHARSET = utf8mb4;
CREATE TABLE `SequenceEvent` (
`sequenceEventId` int(11) unsigned PRIMARY KEY AUTO_INCREMENT,
`sequenceId` int(11) unsigned NOT NULL,
`imageId` int(12) unsigned,
`type` enum(
'XrayDetection',
'XrayExposure',
'LaserExcitation'
) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`time` float NOT NULL,
`time` datetime NOT NULL,
`duration` float NOT NULL,
`period` float DEFAULT NULL,
`repetition` float DEFAULT NULL,
FOREIGN KEY (`sequenceId`) REFERENCES `Sequence`(`sequenceId`) ON DELETE CASCADE ON UPDATE CASCADE
);
\ No newline at end of file
FOREIGN KEY (`sequenceId`) REFERENCES `Sequence`(`sequenceId`) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (`imageId`) REFERENCES `Image`(`imageId`)
) ENGINE = InnoDB AUTO_INCREMENT = 0 DEFAULT CHARSET = utf8mb4;
CREATE TABLE `SampleComponent` (
`sampleComponentId` int(11) unsigned PRIMARY KEY AUTO_INCREMENT,
`blSampleId` int(10) unsigned,
`name` varchar (255),
`componentType` enum(
'Ligand',
'Buffer',
'JetMaterial'
) NOT NULL,
`composition` varchar(255),
`concentration` float,
FOREIGN KEY (`blSampleId`) REFERENCES `BLSample`(`blSampleId`) ON DELETE CASCADE ON UPDATE CASCADE,
) ENGINE = InnoDB AUTO_INCREMENT = 0 DEFAULT CHARSET = utf8mb4;
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment