alter Events Primary Key to just the Id. This prevents a double key index on MonitorId

This commit is contained in:
Isaac Connor 2017-12-15 15:17:49 -05:00
parent 212cd7e6c4
commit cae37e29b0
3 changed files with 7 additions and 2 deletions

View File

@ -209,7 +209,7 @@ CREATE TABLE `Events` (
`StateId` int(10) unsigned NOT NULL,
`Orientation` enum('0','90','180','270','hori','vert') NOT NULL default '0',
`DiskSpace` bigint unsigned default NULL,
PRIMARY KEY (`Id`,`MonitorId`),
PRIMARY KEY (`Id`),
KEY `MonitorId` (`MonitorId`),
KEY `StartTime` (`StartTime`),
KEY `Frames` (`Frames`),

5
db/zm_update-1.31.17.sql Normal file
View File

@ -0,0 +1,5 @@
alter table Events modify Id int(10) unsigned;
alter table Events DROP Primary key;
alter table Events Add Primary key(Id);
alter table Events modify Id int(10) unsigned auto_incremement;

View File

@ -1 +1 @@
1.31.16
1.31.17