CREATE TABLE `GL_RAW` ( `ID` bigint(20) unsigned NOT NULL auto_increment, `PATH` varchar(255) NOT NULL default '', `NAME` varchar(255) NOT NULL default '', `BOOT_NUMBER` bigint(20) default NULL, PRIMARY KEY (`ID`) ) TYPE=InnoDB; CREATE TABLE `GL_ROOT` ( `ID` bigint(20) unsigned NOT NULL auto_increment, `ID_RAW` bigint(20) unsigned NOT NULL default '0', `PATH` varchar(255) NOT NULL default '', `NAME` varchar(255) NOT NULL default '', PRIMARY KEY (`ID`), KEY `ID_RAW_index` (`ID_RAW`), CONSTRAINT `ROOT_fk` FOREIGN KEY (`ID_RAW`) REFERENCES `GL_RAW` (`ID`) ON DELETE CASCADE ) TYPE=InnoDB; CREATE TABLE `GL_RUN` ( `ID` bigint(20) unsigned NOT NULL auto_increment, `ID_REG_RUN` bigint(20) unsigned NOT NULL default '0', `ID_REG_RUN_L2` bigint(20) unsigned default '0', `RUNHEADER_TIME` bigint(31) unsigned NOT NULL default '0', `RUNTRAILER_TIME` bigint(20) unsigned NOT NULL default '0', `EV_REG_PHYS_FROM` int(10) unsigned NOT NULL default '0', `EV_REG_PHYS_TO` int(10) unsigned NOT NULL default '0', `EV_REG_RUNHEADER` int(10) unsigned NOT NULL default '0', `EV_REG_RUNTRAILER` int(10) unsigned NOT NULL default '0', `TRK_CALIB_USED` tinyint(3) unsigned NOT NULL default '0', `EFF_WRK_SCHEDULE` int(10) unsigned NOT NULL default '0', `PRH_VAR_TRG_MODE_A` bigint(32) unsigned NOT NULL default '0', `PRH_VAR_TRG_MODE_B` bigint(32) unsigned NOT NULL default '0', `ACQ_BUILD_INFO` bigint(32) unsigned NOT NULL default '0', `ACQ_VAR_INFO` int(10) unsigned NOT NULL default '0', `VALIDATION` varchar(255) NOT NULL default '', PRIMARY KEY (`ID`), KEY `ID_RUN_fk_constraint` (`ID_REG_RUN`), KEY `ID_RUN_L2_fk_constraint` (`ID_REG_RUN_L2`), CONSTRAINT `ID_RUN_fk_constraint` FOREIGN KEY (`ID_REG_RUN`) REFERENCES `GL_ROOT` (`ID`) ON DELETE CASCADE ) TYPE=InnoDB; CREATE TABLE `GL_TIMESYNC` ( `ID` bigint(20) unsigned NOT NULL auto_increment, `ID_RAW` bigint(20) unsigned NOT NULL default '0', `TYPE` smallint(5) unsigned NOT NULL default '0', `DELTA_OBT_TMSYNC` double NOT NULL default '0', `RMS_DELTA` double NOT NULL default '0', PRIMARY KEY (`ID`), KEY `ID_RAW_index` (`ID_RAW`), CONSTRAINT `TIME_RAW_fk` FOREIGN KEY (`ID_RAW`) REFERENCES `GL_RAW` (`ID`) ON DELETE CASCADE ) TYPE=InnoDB; CREATE TABLE `GL_CALO_CALIB` ( `ID` bigint(20) unsigned NOT NULL auto_increment, `ID_REG_CALIBCALPED` bigint(20) unsigned NOT NULL default '0', `EV_REG_CALIBCALPED` int(10) unsigned NOT NULL default '0', `FROM_TIME` bigint(20) unsigned NOT NULL default '0', `TO_TIME` bigint(20) unsigned NOT NULL default '0', `SECTION` smallint(5) unsigned NOT NULL default '0', PRIMARY KEY (`ID`), KEY `FROM_TIME_index` (`FROM_TIME`), KEY `REG_CAL_index` (`ID_REG_CALIBCALPED`), CONSTRAINT `CALO_REG_fk` FOREIGN KEY (`ID_REG_CALIBCALPED`) REFERENCES `GL_ROOT` (`ID`) ON DELETE CASCADE ) TYPE=InnoDB; CREATE TABLE `GL_S4_CALIB` ( `ID` bigint(20) unsigned NOT NULL auto_increment, `ID_REG_CALIBS4` bigint(20) unsigned NOT NULL default '0', `EV_REG_CALIBS4` int(10) unsigned NOT NULL default '0', `FROM_TIME` bigint(20) unsigned NOT NULL default '0', `TO_TIME` bigint(20) unsigned NOT NULL default '0', `PARAM_FIT0` float default NULL, `PARAM_FIT1` float NOT NULL default '0', PRIMARY KEY (`ID`), KEY `ID_REG_index` (`ID_REG_CALIBS4`), CONSTRAINT `S4_REG_fk` FOREIGN KEY (`ID_REG_CALIBS4`) REFERENCES `GL_ROOT` (`ID`) ON DELETE CASCADE ) TYPE=InnoDB; CREATE TABLE `GL_TRK_CALIB` ( `ID` bigint(20) unsigned NOT NULL auto_increment, `ID_REG_CALIBTRK` bigint(20) unsigned NOT NULL default '0', `EV_REG_CALIBTRK1` int(10) unsigned NOT NULL default '0', `EV_REG_CALIBTRK2` int(10) unsigned NOT NULL default '0', `FROM_TIME` bigint(20) unsigned NOT NULL default '0', `TO_TIME` bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (`ID`), KEY `ID_REG_index` (`ID_REG_CALIBTRK`), CONSTRAINT `TRK_REG_fk` FOREIGN KEY (`ID_REG_CALIBTRK`) REFERENCES `GL_ROOT` (`ID`) ON DELETE CASCADE ) TYPE=InnoDB; CREATE TABLE `GL_PARAM` ( `ID` int(11) NOT NULL auto_increment, `PATH` varchar(255) NOT NULL default '', `NAME` varchar(255) NOT NULL default '', `DESCR` varchar(255) NOT NULL default '', `FROM_TIME` bigint(20) default NULL, `TO_TIME` bigint(20) default NULL, PRIMARY KEY (`ID`) ) TYPE=InnoDB; CREATE TABLE `GL_TLE` ( `ID` int(11) NOT NULL auto_increment, `TLE1` varchar(255) NOT NULL default '', `TLE2` varchar(255) NOT NULL default '', `TLE3` varchar(255) NOT NULL default '', `INSERT_TIME` timestamp NOT NULL, `VALID_FROM_TIME` bigint(20) default NULL, `VALID_FROM_TO` bigint(20) default NULL, `NOTE` varchar(255) NOT NULL default '', PRIMARY KEY (`ID`) ) TYPE=InnoDB;