From acd12d234a9db634d30a1432c18fad2f91331c28 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 10 Jan 2018 12:26:59 -0500 Subject: [PATCH] add Events_Archived table. Add zmstats, zmaudit and zmtrigger settings to Servers table to tell if we should run the services or not. Fix a missing backtick at Scheme --- db/zm_create.sql.in | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index d2369369b..72f8f7681 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -257,6 +257,16 @@ CREATE TABLE `Events_Month` ( KEY `Events_Month_MonitorId_StartTime_idx` (`MonitorId`,`StartTime`) ) ENGINE=@ZM_MYSQL_ENGINE@; + +DROP TABLE IF EXISTS `Events_Archived`; +CREATE TABLE `Events_Archived` ( + `EventId` int(10) unsigned NOT NULL, + `MonitorId` int(10) unsigned NOT NULL, + `DiskSpace` bigint unsigned default NULL, + PRIMARY KEY (`EventId`), + KEY `Events_Month_MonitorId_idx` (`MonitorId`) +) ENGINE=@ZM_MYSQL_ENGINE@; + -- -- Table structure for table `Filters` -- @@ -542,6 +552,9 @@ CREATE TABLE `Servers` ( `FreeMem` bigint unsigned default null, `TotalSwap` bigint unsigned default null, `FreeSwap` bigint unsigned default null, + `zmstats` BOOLEAN NOT NULL DEFAULT FALSE, + `zmaudit` BOOLEAN NOT NULL DEFAULT FALSE, + `zmtrigger` BOOLEAN NOT NULL DEFAULT FALSE, PRIMARY KEY (`Id`) ) ENGINE=@ZM_MYSQL_ENGINE@; @@ -680,7 +693,7 @@ CREATE TABLE `Storage` ( `Name` varchar(64) NOT NULL default '', `Type` enum('local','s3fs') NOT NULL default 'local', `DiskSpace` bigint unsigned default NULL, - `Scheme enum('Deep','Medium','Shallow') NOT NULL default 'Medium', + `Scheme` enum('Deep','Medium','Shallow') NOT NULL default 'Medium', `ServerId` int(10) unsigned, PRIMARY KEY (`Id`) ) ENGINE=@ZM_MYSQL_ENGINE@;