Change Frame to have a PrimaryKey called ID
This commit is contained in:
parent
b94a148559
commit
679a663861
|
@ -236,13 +236,14 @@ CREATE TABLE `Filters` (
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `Frames`;
|
DROP TABLE IF EXISTS `Frames`;
|
||||||
CREATE TABLE `Frames` (
|
CREATE TABLE `Frames` (
|
||||||
|
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`EventId` int(10) unsigned NOT NULL default '0',
|
`EventId` int(10) unsigned NOT NULL default '0',
|
||||||
`FrameId` int(10) unsigned NOT NULL default '0',
|
`FrameId` int(10) unsigned NOT NULL default '0',
|
||||||
`Type` enum('Normal','Bulk','Alarm') NOT NULL default 'Normal',
|
`Type` enum('Normal','Bulk','Alarm') NOT NULL default 'Normal',
|
||||||
`TimeStamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
`TimeStamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||||
`Delta` decimal(8,2) NOT NULL default '0.00',
|
`Delta` decimal(8,2) NOT NULL default '0.00',
|
||||||
`Score` smallint(5) unsigned NOT NULL default '0',
|
`Score` smallint(5) unsigned NOT NULL default '0',
|
||||||
PRIMARY KEY (`EventId`,`FrameId`),
|
PRIMARY KEY (`Id`),
|
||||||
KEY `Type` (`Type`),
|
KEY `Type` (`Type`),
|
||||||
KEY `TimeStamp` (`TimeStamp`)
|
KEY `TimeStamp` (`TimeStamp`)
|
||||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||||
|
|
Loading…
Reference in New Issue