/[PAMELA software]/YodaProfiler/docs/PAMELAProductionDB.sql
ViewVC logotype

Annotation of /YodaProfiler/docs/PAMELAProductionDB.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Tue Oct 31 15:35:58 2006 UTC (18 years, 1 month ago) by mocchiut
Branch: MAIN
CVS Tags: v2r01, v2r00, v2r02
Changes since 1.4: +8 -12 lines
Force mode introduced together with other features, R2-D2 moved here, manual added

1 mocchiut 1.1 DROP DATABASE IF EXISTS dbname;
2    
3     CREATE DATABASE dbname;
4    
5     USE dbname;
6    
7 mocchiut 1.3 CREATE TABLE `_RUNID_GEN` (
8     `ID` int(10) unsigned NOT NULL auto_increment,
9     PRIMARY KEY (`ID`)
10     ) ENGINE=InnoDB;
11    
12 mocchiut 1.1 CREATE TABLE `GL_RAW` (
13     `ID` int(10) unsigned NOT NULL auto_increment,
14     `PATH` varchar(255) NOT NULL default '',
15     `NAME` varchar(255) NOT NULL default '',
16     `BOOT_NUMBER` smallint(5) unsigned default NULL,
17     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
18     PRIMARY KEY (`ID`),
19     KEY `BOOTNUMBER_index` (`BOOT_NUMBER`),
20     KEY `PATH_index` (`PATH`)
21     ) ENGINE=InnoDB;
22    
23     CREATE TABLE `GL_ROOT` (
24     `ID` int(10) unsigned NOT NULL auto_increment,
25     `ID_RAW` int(10) unsigned NOT NULL default '0',
26     `ID_TIMESYNC` int(10) unsigned NOT NULL default '0',
27     `PATH` varchar(255) NOT NULL default '',
28     `NAME` varchar(255) NOT NULL default '',
29     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
30     PRIMARY KEY (`ID`),
31     KEY `ID_RAW_index` (`ID_RAW`),
32     KEY `PATH_index` (`PATH`),
33     CONSTRAINT `ROOT_fk` FOREIGN KEY (`ID_RAW`) REFERENCES `GL_RAW` (`ID`) ON DELETE CASCADE
34     ) ENGINE=InnoDB;
35    
36     CREATE TABLE `GL_RESURS_OFFSET` (
37     `ID` int(10) unsigned NOT NULL auto_increment,
38 mocchiut 1.3 `FROM_ORBIT` int(10) unsigned NOT NULL default '0',
39     `SPECIAL_FILE` varchar(255) NOT NULL default '',
40 mocchiut 1.1 `OFFSET_DATE` timestamp default '0000-00-00 00:00:00',
41     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
42     PRIMARY KEY (`ID`)
43     ) ENGINE=InnoDB;
44    
45 mocchiut 1.3 INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','','2006-06-14 21:00:00',NULL);
46     INSERT INTO GL_RESURS_OFFSET VALUES(0,'1619','','2006-09-28 21:00:00',NULL);
47 mocchiut 1.1
48     CREATE TABLE `GL_TIMESYNC` (
49     `ID` int(10) unsigned NOT NULL auto_increment,
50     `ID_RAW` int(10) unsigned NOT NULL default '0',
51     `OBT0` int(10) unsigned NOT NULL default '0',
52     `TIMESYNC` int(10) unsigned NOT NULL default '0',
53     `TYPE` smallint(5) unsigned NOT NULL default '0',
54     PRIMARY KEY (`ID`),
55     KEY `ID_RAW_index` (`ID_RAW`),
56     KEY `TYPE_index` (`TYPE`),
57     CONSTRAINT `TIME_RAW_fk` FOREIGN KEY (`ID_RAW`) REFERENCES `GL_RAW` (`ID`) ON DELETE CASCADE
58     ) ENGINE=InnoDB;
59    
60     CREATE TABLE `GL_PARAM` (
61     `ID` int(10) unsigned NOT NULL auto_increment,
62     `PATH` varchar(255) NOT NULL default '',
63     `NAME` varchar(255) NOT NULL default '',
64     `FROM_TIME` int(10) unsigned NOT NULL default '0',
65     `TO_TIME` int(10) unsigned NOT NULL default '0',
66 mocchiut 1.2 `TYPE` smallint(5) unsigned NOT NULL default '0',
67 mocchiut 1.1 `DESCR` varchar(255) NOT NULL default '',
68     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
69     PRIMARY KEY (`ID`),
70     KEY `PATH_index` (`PATH`),
71     KEY `NAME_index` (`NAME`),
72     KEY `TYPE_index` (`TYPE`),
73     KEY `DESCR_index` (`DESCR`)
74     ) ENGINE=InnoDB;
75    
76     CREATE TABLE `GL_TLE` (
77     `ID` int(10) NOT NULL auto_increment,
78     `TLE1` varchar(255) NOT NULL default '',
79     `TLE2` varchar(255) NOT NULL default '',
80     `TLE3` varchar(255) NOT NULL default '',
81 mocchiut 1.2 `FROM_TIME` datetime NOT NULL default '0000-00-00 00:00:00',
82 mocchiut 1.1 `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
83     PRIMARY KEY (`ID`)
84     ) ENGINE=InnoDB;
85    
86     CREATE TABLE `GL_RUN` (
87     `ID` int(10) unsigned NOT NULL auto_increment,
88     `ID_RUN_FRAG` int(10) unsigned NOT NULL default '0',
89     `ID_ROOT_L0` int(10) unsigned NOT NULL default '0',
90     `ID_ROOT_L2` int(10) unsigned NOT NULL default '0',
91     `RUNHEADER_TIME` int(10) unsigned NOT NULL default '0',
92     `RUNTRAILER_TIME` int(10) unsigned NOT NULL default '0',
93     `RUNHEADER_OBT` int(10) unsigned NOT NULL default '0',
94     `RUNTRAILER_OBT` int(10) unsigned NOT NULL default '0',
95     `RUNHEADER_PKT` int(10) unsigned NOT NULL default '0',
96     `RUNTRAILER_PKT` int(10) unsigned NOT NULL default '0',
97     `BOOT_NUMBER` smallint(5) unsigned NOT NULL default '0',
98     `EV_FROM` int(10) unsigned NOT NULL default '0',
99     `EV_TO` int(10) unsigned NOT NULL default '0',
100     `NEVENTS` int(10) unsigned NOT NULL default '0',
101     `PKT_COUNTER` int(10) unsigned NOT NULL default '0',
102     `PKT_READY_COUNTER` int(10) unsigned NOT NULL default '0',
103     `COMPILATIONTIMESTAMP` int(10) unsigned NOT NULL default '0',
104     `FAV_WRK_SCHEDULE` tinyint(3) unsigned NOT NULL default '0',
105     `EFF_WRK_SCHEDULE` tinyint(3) unsigned NOT NULL default '0',
106     `PRH_VAR_TRG_MODE_A` int(10) unsigned NOT NULL default '0',
107     `PRH_VAR_TRG_MODE_B` int(10) unsigned NOT NULL default '0',
108     `ACQ_BUILD_INFO` int(10) unsigned NOT NULL default '0',
109     `ACQ_VAR_INFO` smallint(5) unsigned NOT NULL default '0',
110     `RM_ACQ_AFTER_CALIB` tinyint(3) NOT NULL default '0',
111     `RM_ACQ_SETTING_MODE` tinyint(3) NOT NULL default '0',
112     `TRK_CALIB_USED` int(10) unsigned NOT NULL default '0',
113     `CAL_DSP_MASK` tinyint(3) unsigned NOT NULL default '0',
114     `LAST_TIMESYNC` int(10) unsigned NOT NULL default '0',
115     `OBT_TIMESYNC` int(10) unsigned NOT NULL default '0',
116     `VALIDATION` tinyint(3) unsigned NOT NULL default '0',
117     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
118     PRIMARY KEY (`ID`),
119     KEY `ID_RUN_FRAG_index` (`ID_RUN_FRAG`),
120     KEY `ID_ROOT_L0_index` (`ID_ROOT_L0`),
121     KEY `ID_ROOT_L2_index` (`ID_ROOT_L2`),
122     KEY `COMPILATIONTS_index` (`COMPILATIONTIMESTAMP`),
123     KEY `VALID_index` (`VALIDATION`),
124     KEY `TRKCALIB_index` (`TRK_CALIB_USED`),
125     KEY `CALDSPMASK_index` (`CAL_DSP_MASK`),
126     KEY `EFF_WS_index` (`EFF_WRK_SCHEDULE`),
127     KEY `FAV_WS_index` (`FAV_WRK_SCHEDULE`),
128     KEY `RM_ACQ_AFTER_CALIB_index` (`RM_ACQ_AFTER_CALIB`),
129     KEY `RM_ACQ_SETTING_MODE_index` (`RM_ACQ_SETTING_MODE`),
130     KEY `ACQ_VAR_INFO_index` (`ACQ_VAR_INFO`),
131     KEY `TRG_MODE_A_index` (`PRH_VAR_TRG_MODE_A`),
132     KEY `TRG_MODE_B_index` (`PRH_VAR_TRG_MODE_B`),
133     KEY `NEVENTS_index` (`NEVENTS`),
134     KEY `BOOTNUMBER_index` (`BOOT_NUMBER`),
135     KEY `ID_RUN_fk_constraint` (`ID_ROOT_L0`),
136 mocchiut 1.5 KEY `ID_RUN_L2_fk_constraint` (`ID_ROOT_L2`)
137 mocchiut 1.1 ) ENGINE=InnoDB;
138    
139     CREATE TABLE `GL_RUN_FRAGMENTS` (
140     `ID` int(10) unsigned NOT NULL auto_increment,
141     `ID_RUN_FRAG` int(10) unsigned NOT NULL default '0',
142     `ID_ROOT_L0` int(10) unsigned NOT NULL default '0',
143     `ID_ROOT_L2` int(10) unsigned NOT NULL default '0',
144     `RUNHEADER_TIME` int(10) unsigned NOT NULL default '0',
145     `RUNTRAILER_TIME` int(10) unsigned NOT NULL default '0',
146     `RUNHEADER_OBT` int(10) unsigned NOT NULL default '0',
147     `RUNTRAILER_OBT` int(10) unsigned NOT NULL default '0',
148     `RUNHEADER_PKT` int(10) unsigned NOT NULL default '0',
149     `RUNTRAILER_PKT` int(10) unsigned NOT NULL default '0',
150     `BOOT_NUMBER` smallint(5) unsigned NOT NULL default '0',
151     `EV_FROM` int(10) unsigned NOT NULL default '0',
152     `EV_TO` int(10) unsigned NOT NULL default '0',
153     `NEVENTS` int(10) unsigned NOT NULL default '0',
154     `PKT_COUNTER` int(10) unsigned NOT NULL default '0',
155     `PKT_READY_COUNTER` int(10) unsigned NOT NULL default '0',
156     `COMPILATIONTIMESTAMP` int(10) unsigned NOT NULL default '0',
157     `FAV_WRK_SCHEDULE` tinyint(3) unsigned NOT NULL default '0',
158     `EFF_WRK_SCHEDULE` tinyint(3) unsigned NOT NULL default '0',
159     `PRH_VAR_TRG_MODE_A` int(10) unsigned NOT NULL default '0',
160     `PRH_VAR_TRG_MODE_B` int(10) unsigned NOT NULL default '0',
161     `ACQ_BUILD_INFO` int(10) unsigned NOT NULL default '0',
162     `ACQ_VAR_INFO` smallint(5) unsigned NOT NULL default '0',
163     `RM_ACQ_AFTER_CALIB` tinyint(3) NOT NULL default '0',
164     `RM_ACQ_SETTING_MODE` tinyint(3) NOT NULL default '0',
165     `TRK_CALIB_USED` int(10) unsigned NOT NULL default '0',
166     `CAL_DSP_MASK` tinyint(3) unsigned NOT NULL default '0',
167     `LAST_TIMESYNC` int(10) unsigned NOT NULL default '0',
168     `OBT_TIMESYNC` int(10) unsigned NOT NULL default '0',
169     `VALIDATION` tinyint(3) unsigned NOT NULL default '0',
170     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
171     PRIMARY KEY (`ID`),
172     KEY `ID_RUN_FRAG_index` (`ID_RUN_FRAG`),
173     KEY `ID_ROOT_L0_index` (`ID_ROOT_L0`),
174     KEY `BOOTNUMBER_index` (`BOOT_NUMBER`),
175     KEY `TRKCALIB_index` (`TRK_CALIB_USED`),
176 mocchiut 1.5 KEY `NID_RUN_fk_constraint` (`ID_ROOT_L0`)
177 mocchiut 1.1 ) ENGINE=InnoDB;
178    
179 mocchiut 1.4 CREATE TABLE `GL_RUN_TRASH` (
180 mocchiut 1.5 `ID_TRASH` int(10) unsigned NOT NULL auto_increment,
181     `ID` int(10) unsigned NOT NULL default '0',
182 mocchiut 1.4 `ID_RUN_FRAG` int(10) unsigned NOT NULL default '0',
183     `ID_ROOT_L0` int(10) unsigned NOT NULL default '0',
184     `ID_ROOT_L2` int(10) unsigned NOT NULL default '0',
185     `RUNHEADER_TIME` int(10) unsigned NOT NULL default '0',
186     `RUNTRAILER_TIME` int(10) unsigned NOT NULL default '0',
187     `RUNHEADER_OBT` int(10) unsigned NOT NULL default '0',
188     `RUNTRAILER_OBT` int(10) unsigned NOT NULL default '0',
189     `RUNHEADER_PKT` int(10) unsigned NOT NULL default '0',
190     `RUNTRAILER_PKT` int(10) unsigned NOT NULL default '0',
191     `BOOT_NUMBER` smallint(5) unsigned NOT NULL default '0',
192     `EV_FROM` int(10) unsigned NOT NULL default '0',
193     `EV_TO` int(10) unsigned NOT NULL default '0',
194     `NEVENTS` int(10) unsigned NOT NULL default '0',
195     `PKT_COUNTER` int(10) unsigned NOT NULL default '0',
196     `PKT_READY_COUNTER` int(10) unsigned NOT NULL default '0',
197     `COMPILATIONTIMESTAMP` int(10) unsigned NOT NULL default '0',
198     `FAV_WRK_SCHEDULE` tinyint(3) unsigned NOT NULL default '0',
199     `EFF_WRK_SCHEDULE` tinyint(3) unsigned NOT NULL default '0',
200     `PRH_VAR_TRG_MODE_A` int(10) unsigned NOT NULL default '0',
201     `PRH_VAR_TRG_MODE_B` int(10) unsigned NOT NULL default '0',
202     `ACQ_BUILD_INFO` int(10) unsigned NOT NULL default '0',
203     `ACQ_VAR_INFO` smallint(5) unsigned NOT NULL default '0',
204     `RM_ACQ_AFTER_CALIB` tinyint(3) NOT NULL default '0',
205     `RM_ACQ_SETTING_MODE` tinyint(3) NOT NULL default '0',
206     `TRK_CALIB_USED` int(10) unsigned NOT NULL default '0',
207     `CAL_DSP_MASK` tinyint(3) unsigned NOT NULL default '0',
208     `LAST_TIMESYNC` int(10) unsigned NOT NULL default '0',
209     `OBT_TIMESYNC` int(10) unsigned NOT NULL default '0',
210     `VALIDATION` tinyint(3) unsigned NOT NULL default '0',
211     `FILENAMEL0` varchar(255) NOT NULL default '',
212     `FILENAMEL2` varchar(255) NOT NULL default '',
213     `BELONGED_TO` varchar(255) NOT NULL default '',
214     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
215 mocchiut 1.5 PRIMARY KEY (`ID_TRASH`),
216 mocchiut 1.4 KEY `TID_RUN_FRAG_index` (`ID_RUN_FRAG`),
217     KEY `TID_ROOT_L0_index` (`ID_ROOT_L0`),
218     KEY `TBOOTNUMBER_index` (`BOOT_NUMBER`),
219     KEY `TTRKCALIB_index` (`TRK_CALIB_USED`),
220     KEY `TFNAME0_index` (`FILENAMEL0`),
221     KEY `TFNAME2_index` (`FILENAMEL2`),
222     KEY `TBELONG_index` (`BELONGED_TO`)
223     ) ENGINE=InnoDB;
224    
225 mocchiut 1.1 CREATE TABLE `GL_CALO_CALIB` (
226     `ID` int(10) unsigned NOT NULL auto_increment,
227     `ID_ROOT_L0` int(10) unsigned NOT NULL default '0',
228     `EV_ROOT` int(10) unsigned NOT NULL default '0',
229     `FROM_TIME` int(10) unsigned NOT NULL default '0',
230     `TO_TIME` int(10) unsigned NOT NULL default '0',
231     `SECTION` tinyint(3) unsigned NOT NULL default '0',
232     `OBT` int(10) unsigned NOT NULL default '0',
233     `PKT` int(10) unsigned NOT NULL default '0',
234     `BOOT_NUMBER` smallint(5) unsigned NOT NULL default '0',
235     `VALIDATION` tinyint(3) unsigned NOT NULL default '0',
236     PRIMARY KEY (`ID`),
237     KEY `SECTION_index` (`SECTION`),
238     KEY `EV_ROOT_index` (`EV_ROOT`),
239     KEY `ID_ROOT_index` (`ID_ROOT_L0`),
240     KEY `BOOTNUMBER_index` (`BOOT_NUMBER`),
241 mocchiut 1.5 KEY `VALID1_index` (`VALIDATION`)
242 mocchiut 1.1 ) ENGINE=InnoDB;
243    
244     CREATE TABLE `GL_TRK_CALIB` (
245     `ID` int(10) unsigned NOT NULL auto_increment,
246     `ID_ROOT_L0` int(10) unsigned NOT NULL default '0',
247     `EV_ROOT_CALIBTRK1` int(10) unsigned default NULL,
248     `EV_ROOT_CALIBTRK2` int(10) unsigned default NULL,
249     `FROM_TIME` int(10) unsigned NOT NULL default '0',
250     `TO_TIME` int(10) unsigned NOT NULL default '0',
251     `OBT1` int(10) unsigned NOT NULL default '0',
252     `PKT1` int(10) unsigned NOT NULL default '0',
253     `OBT2` int(10) unsigned NOT NULL default '0',
254     `PKT2` int(10) unsigned NOT NULL default '0',
255     `BOOT_NUMBER` smallint(5) unsigned NOT NULL default '0',
256     `VALIDATION` tinyint(3) unsigned NOT NULL default '0',
257     PRIMARY KEY (`ID`),
258     KEY `ID_ROOT_index` (`ID_ROOT_L0`),
259     KEY `EV_ROOT_CALIBTRK1index` (`EV_ROOT_CALIBTRK1`),
260     KEY `EV_ROOT_CALIBTRK2index` (`EV_ROOT_CALIBTRK2`),
261     KEY `BOOTNUMBER_index` (`BOOT_NUMBER`),
262 mocchiut 1.5 KEY `VALID2_index` (`VALIDATION`)
263 mocchiut 1.1 ) ENGINE=InnoDB;
264    
265     CREATE TABLE `GL_S4_CALIB` (
266     `ID` int(10) unsigned NOT NULL auto_increment,
267     `ID_ROOT_L0` int(10) unsigned NOT NULL default '0',
268     `EV_ROOT` int(10) unsigned NOT NULL default '0',
269     `FROM_TIME` int(10) unsigned NOT NULL default '0',
270     `TO_TIME` int(10) unsigned NOT NULL default '0',
271     `OBT` int(10) unsigned NOT NULL default '0',
272     `PKT` int(10) unsigned NOT NULL default '0',
273     `BOOT_NUMBER` smallint(5) unsigned NOT NULL default '0',
274     PRIMARY KEY (`ID`),
275     KEY `ID_ROOT_index` (`ID_ROOT_L0`),
276 mocchiut 1.5 KEY `BOOTNUMBER_index` (`BOOT_NUMBER`)
277 mocchiut 1.1 ) ENGINE=InnoDB;
278    
279    

  ViewVC Help
Powered by ViewVC 1.1.23