-
Notifications
You must be signed in to change notification settings - Fork 2
/
model.mysql
executable file
·127 lines (95 loc) · 2.43 KB
/
model.mysql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
CREATE TABLE IF NOT EXISTS Cultures
(
CultureID INTEGER PRIMARY KEY,
CultureName VARCHAR(100)
);
CREATE TABLE IF NOT EXISTS Plates
(
PlateID INTEGER PRIMARY KEY,
PlateName VARCHAR(50),
PlateClass INTEGER,
PlatePurpose INTEGER,
PlateFinished INTEGER
);
CREATE TABLE IF NOT EXISTS PlatePositions
(
PlatePositionID INTEGER PRIMARY KEY,
PlateID INT,
Row INT,
Column INT,
CultureID INT,
Status INT,
timeSampled INT,
CONSTRAINT unq UNIQUE (PlateID,Row,Column)
);
CREATE TABLE IF NOT EXISTS PlateValues
(
PlateValueID INTEGER PRIMARY KEY,
PlateID INT,
Row INT,
Column INT,
time INT
);
CREATE TABLE IF NOT EXISTS Actions
(
ActionID INTEGER PRIMARY KEY,
PlateID INT,
Row INT,
Column INT,
TypeOfOperation VARCHAR(20),
ActionText VARCHAR(20),
ValueOfOperation NUMERIC,
ActionTime INT
);
CREATE TABLE IF NOT EXISTS PlateClasses
(
PlateClassID INTEGER PRIMARY KEY,
PlateRows INTEGER,
PlateCols INTEGER
);
CREATE TABLE IF NOT EXISTS Measurements
(
MeasurementID INTEGER PRIMARY KEY,
PlateID INTEGER,
Row INTEGER,
Column INTEGER,
MeasurementValue FLOAT,
MeasurementType INTEGER,
MeasurementTime INTEGER,
CONSTRAINT unq UNIQUE (PlateID,Row,Column)
);
CREATE TABLE IF NOT EXISTS CommandQueue
(
CommandID INTEGER PRIMARY KEY,
Command VARCHAR(20),
Pipette VARCHAR(20),
Labware VARCHAR(20),
PlateID INTEGER,
Row INTEGER,
Column INTEGER,
Volume INTEGER,
queued INTEGER DEFAULT 0,
DoneAt INTEGER,
OrderOfEvents INTEGER,
LabwareType VARCHAR(30),
Slot VARCHAR(10),
OnCompletion VARCHAR(300),
email VARCHAR(50),
message VARCHAR(500)
);
INSERT INTO PlateClasses (PlateClassID,PlateRows,PlateCols) VALUES (0,8,12);
INSERT INTO PlateClasses (PlateClassID,PlateRows,PlateCols) VALUES (1,4,6);
CREATE TABLE IF NOT EXISTS MachineStatusProperties
(
name VARCHAR(30) PRIMARY KEY,
value VARCHAR(20)
);
INSERT INTO MachineStatusProperties (name,value) VALUES ("tipsusedpipette0",0);
INSERT INTO MachineStatusProperties (name,value) VALUES ("tipsusedpipette1",0);
INSERT INTO MachineStatusProperties (name,value) VALUES ("plateloaded0",0);
INSERT INTO MachineStatusProperties (name,value) VALUES ("plateloaded1",0);
CREATE TABLE IF NOT EXISTS TimeEstimates
(
Command VARCHAR(30) PRIMARY KEY,
TimeEstimate VARCHAR(20)
);