add ParentId to Groups, bump version

This commit is contained in:
Isaac Connor 2017-09-28 12:23:23 -04:00
parent 160a553fb9
commit 99c602e83d
3 changed files with 19 additions and 1 deletions

View File

@ -264,6 +264,7 @@ DROP TABLE IF EXISTS `Groups`;
CREATE TABLE `Groups` (
`Id` int(10) unsigned NOT NULL auto_increment,
`Name` varchar(64) NOT NULL default '',
`ParentId` int(10) unsigned,
`MonitorIds` tinytext NOT NULL,
PRIMARY KEY (`Id`)
) ENGINE=@ZM_MYSQL_ENGINE@;

17
db/zm_update-1.31.5.sql Normal file
View File

@ -0,0 +1,17 @@
--
-- Add StorageId column to Monitors
--
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Groups'
AND table_schema = DATABASE()
AND column_name = 'ParentId'
) > 0,
"SELECT 'Column GroupId exists in Groups'",
"ALTER TABLE Groups ADD `ParentId` int(10) unsigned AFTER `Name`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;

View File

@ -1 +1 @@
1.31.4
1.31.5