create the Update DIskSpace filter if it doesn't exist
This commit is contained in:
parent
a79017b168
commit
edd5bd8874
|
@ -10,3 +10,14 @@ SET @s = (SELECT IF(
|
||||||
|
|
||||||
PREPARE stmt FROM @s;
|
PREPARE stmt FROM @s;
|
||||||
EXECUTE stmt;
|
EXECUTE stmt;
|
||||||
|
|
||||||
|
SET @s = (SELECT IF(
|
||||||
|
(SELECT COUNT(*) FROM Filters WHERE Name = 'Update DiskSpace'
|
||||||
|
AND Query = '{"terms":[{"attr":"DiskSpace","op":"IS","val":"NULL"}],"sort_field":"Id","sort_asc":"1","limit":"100"}'
|
||||||
|
) > 0,
|
||||||
|
"SELECT 'Update Disk Space Filter already exists.'",
|
||||||
|
"INSERT INTO Filters (Name,Query,UpdateDiskSpace,Background) values ('Update DiskSpace','{\"terms\":[{\"attr\":\"DiskSpace\",\"op\":\"IS\",\"val\":\"NULL\"}],\"sort_field\":\"Id\",\"sort_asc\":\"1\",\"limit\":\"100\"}',1,1)"
|
||||||
|
));
|
||||||
|
|
||||||
|
PREPARE stmt FROM @s;
|
||||||
|
EXECUTE stmt;
|
||||||
|
|
Loading…
Reference in New Issue