Add ExecuteInterval to Filters
This commit is contained in:
parent
a65f2b42ce
commit
e2df6e5074
|
@ -283,6 +283,7 @@ CREATE TABLE `Filters` (
|
||||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||||
`Name` varchar(64) NOT NULL default '',
|
`Name` varchar(64) NOT NULL default '',
|
||||||
`UserId` int(10) unsigned,
|
`UserId` int(10) unsigned,
|
||||||
|
`ExecuteInterval` int(10) unsigned NOT NULL default '60',
|
||||||
`Query_json` text NOT NULL,
|
`Query_json` text NOT NULL,
|
||||||
`AutoArchive` tinyint(3) unsigned NOT NULL default '0',
|
`AutoArchive` tinyint(3) unsigned NOT NULL default '0',
|
||||||
`AutoUnarchive` tinyint(3) unsigned NOT NULL default '0',
|
`AutoUnarchive` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
--
|
||||||
|
-- Update Filters table to have a ExecuteInterval Column
|
||||||
|
--
|
||||||
|
|
||||||
|
SELECT 'Checking for ExecuteInterval in Filters';
|
||||||
|
SET @s = (SELECT IF(
|
||||||
|
(SELECT COUNT(*)
|
||||||
|
FROM INFORMATION_SCHEMA.COLUMNS
|
||||||
|
WHERE table_name = 'Filters'
|
||||||
|
AND table_schema = DATABASE()
|
||||||
|
AND column_name = 'ExecuteInterval'
|
||||||
|
) > 0,
|
||||||
|
"SELECT 'Column ExecuteInterval already exists in Filters'",
|
||||||
|
"ALTER TABLE Filters ADD COLUMN `ExecuteInterval` int(10) unsigned NOT NULL default '60' AFTER `UserId`"
|
||||||
|
));
|
||||||
|
|
||||||
|
PREPARE stmt FROM @s;
|
||||||
|
EXECUTE stmt;
|
Loading…
Reference in New Issue