add Orientation to Events table
This commit is contained in:
parent
b00588b6ff
commit
1862611b94
|
@ -205,6 +205,7 @@ CREATE TABLE `Events` (
|
||||||
`Messaged` tinyint(3) unsigned NOT NULL default '0',
|
`Messaged` tinyint(3) unsigned NOT NULL default '0',
|
||||||
`Executed` tinyint(3) unsigned NOT NULL default '0',
|
`Executed` tinyint(3) unsigned NOT NULL default '0',
|
||||||
`Notes` text,
|
`Notes` text,
|
||||||
|
`Orientation` enum('0','90','180','270','hori','vert') NOT NULL default '0',
|
||||||
PRIMARY KEY (`Id`,`MonitorId`),
|
PRIMARY KEY (`Id`,`MonitorId`),
|
||||||
KEY `MonitorId` (`MonitorId`),
|
KEY `MonitorId` (`MonitorId`),
|
||||||
KEY `StartTime` (`StartTime`),
|
KEY `StartTime` (`StartTime`),
|
||||||
|
@ -396,6 +397,7 @@ CREATE TABLE `Monitors` (
|
||||||
`WebColour` varchar(32) NOT NULL default 'red',
|
`WebColour` varchar(32) NOT NULL default 'red',
|
||||||
`Exif` tinyint(1) unsigned NOT NULL default '0',
|
`Exif` tinyint(1) unsigned NOT NULL default '0',
|
||||||
`Sequence` smallint(5) unsigned default NULL,
|
`Sequence` smallint(5) unsigned default NULL,
|
||||||
|
`Orientation` enum('0','90','180','270','hori','vert') NOT NULL default '0',
|
||||||
PRIMARY KEY (`Id`)
|
PRIMARY KEY (`Id`)
|
||||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
--
|
||||||
|
-- This updates a 1.30.7 database to 1.30.8
|
||||||
|
--
|
||||||
|
|
||||||
|
SET @s = (SELECT IF(
|
||||||
|
(SELECT COUNT(*)
|
||||||
|
FROM INFORMATION_SCHEMA.COLUMNS
|
||||||
|
WHERE table_name = 'Events'
|
||||||
|
AND table_schema = DATABASE()
|
||||||
|
AND column_name = 'Orientation'
|
||||||
|
) > 0,
|
||||||
|
"SELECT 'Column Orientation exists in Events'",
|
||||||
|
"ALTER TABLE `Events` ADD `Orientation` enum('0','90','180','270','hori','vert') NOT NULL default '0' AFTER Notes",
|
||||||
|
));
|
||||||
|
|
||||||
|
PREPARE stmt FROM @s;
|
||||||
|
EXECUTE stmt;
|
Loading…
Reference in New Issue