drop table if exists terminal_parameter; CREATE TABLE `terminal_parameter` ( `terminal_parameter_id` int(11) NOT NULL AUTO_INCREMENT, `serial` int(11) DEFAULT NULL, `network_type` char(1) DEFAULT NULL, `mcc` int(8) DEFAULT NULL, `mnc` int(8) DEFAULT NULL, `lac` int(8) DEFAULT NULL, `cellid` int(8) DEFAULT NULL, `bsic_psc` int(8) DEFAULT NULL, `ta_ec_io` int(8) DEFAULT NULL, `bcch_rxlev_rscp` int(8) DEFAULT NULL, `arfcn_uarfcn` int(8) DEFAULT NULL, `rxq` int(8) DEFAULT NULL, `c1` int(8) DEFAULT NULL, `c2` int(8) DEFAULT NULL, `signal_intensity` int(8) DEFAULT NULL, `error_rate` int(8) DEFAULT NULL, `alarm_type` varchar(16) DEFAULT NULL, `txpower` int(8) DEFAULT NULL, `small_running_number` int(8) DEFAULT NULL, `createtime` datetime NOT NULL, `userid` int(8) NOT NULL, `terminal_id` int(8) DEFAULT NULL, `state` char(1) DEFAULT '0', `order_definition_id` int(8) DEFAULT NULL, `order_code` varchar(20) DEFAULT NULL, `charg_voltage` float(8,2) DEFAULT NULL, `battery_voltage` float(8,2) DEFAULT NULL, `temprad` float(8,2) DEFAULT NULL, `run_state` int(8) DEFAULT NULL, `switching_value1` int(8) DEFAULT NULL, `switching_value2` int(8) DEFAULT NULL, `bcch_freq` int(8) DEFAULT NULL, `rxlev` int(8) DEFAULT NULL, `rxlev_full` int(8) DEFAULT NULL, `rxlev_sub` int(8) DEFAULT NULL, `rxqual` int(8) DEFAULT NULL, `rxqual_full` int(8) DEFAULT NULL, `rxqual_sub` int(8) DEFAULT NULL, `idle_ts` int(8) DEFAULT NULL, `timing_advance` int(8) DEFAULT NULL, `tch_efr_out` int(8) DEFAULT NULL, `tch_efr_in` int(8) DEFAULT NULL, `dtx` int(8) DEFAULT NULL, `major_cycle_frequency` int(8) DEFAULT NULL, PRIMARY KEY (`terminal_parameter_id`,`createtime`), KEY `idx_createtime` (`createtime`), KEY `idx_terminal_id` (`terminal_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 PARTITION BY RANGE(TO_DAYS (createtime)) ( PARTITION p20101115 VALUES LESS THAN (TO_DAYS('2010-11-15')), PARTITION p20101130 VALUES LESS THAN (TO_DAYS('2010-11-30')), PARTITION p20101215 VALUES LESS THAN (TO_DAYS('2010-12-15')), PARTITION p20101231 VALUES LESS THAN (TO_DAYS('2010-12-31')), PARTITION p20110115 VALUES LESS THAN (TO_DAYS('2011-01-15')), PARTITION p20110131 VALUES LESS THAN (TO_DAYS('2011-01-31')), PARTITION p20110215 VALUES LESS THAN (TO_DAYS('2011-02-15')), PARTITION p20110228 VALUES LESS THAN (TO_DAYS('2011-02-28')), PARTITION p20110315 VALUES LESS THAN (TO_DAYS('2011-03-15')), PARTITION p20110331 VALUES LESS THAN (TO_DAYS('2011-03-31')), PARTITION p20110415 VALUES LESS THAN (TO_DAYS('2011-04-15')), PARTITION p20110430 VALUES LESS THAN (TO_DAYS('2011-04-30')) ); |