From 30c2efa7fa9f7e4e0d73a1ef89e000bf8348bf1b Mon Sep 17 00:00:00 2001 From: Tomas Plesnik <plesnik@ics.muni.cz> Date: Fri, 24 May 2013 11:57:00 +0200 Subject: [PATCH] pridano zaindexovani sloupcu po updatu databaze --- src/warden-server/doc/UPDATE | 9 +++++++-- src/warden-server/doc/warden21to22.patch | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/warden-server/doc/UPDATE b/src/warden-server/doc/UPDATE index c9ce426..e6dbefe 100644 --- a/src/warden-server/doc/UPDATE +++ b/src/warden-server/doc/UPDATE @@ -32,9 +32,14 @@ B. Update steps C. Post-update steps -------------------- -1) Update Warden server database +1) Upgrade Warden server database + + $ mysql -u <user> -h localhost -p <password> < {warden-server_path}/doc/warden21to22.patch + + +ATTENTION: Running of the database update script may take a long time (in minutes - depending on the size of the database). +During this process the database will be not available! - $ mysql -u <user> -h localhost -p <password> < {warden-server_path}/doc/warden20to21.patch 2) Restart Apache server diff --git a/src/warden-server/doc/warden21to22.patch b/src/warden-server/doc/warden21to22.patch index 2a4ef4e..2278f44 100644 --- a/src/warden-server/doc/warden21to22.patch +++ b/src/warden-server/doc/warden21to22.patch @@ -11,3 +11,8 @@ WHERE `events.hostname` = `clients.hostname` AND `events.service` = `clients.ser ALTER TABLE `events` DROP COLUMN `hostname`, DROP COLUMN `service`; + +ALTER TABLE `events` +ADD INDEX `idx_events_type_valid` (`type`,`valid`), +ADD INDEX `idx_events_client_id` (`client_id`), +ADD INDEX `idx_events_detected` (`detected`); -- GitLab