From db6bf2417146a91016bf3fa418ed82fee8a757f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Serman?= Date: Sun, 21 Apr 2013 09:27:59 +0000 Subject: [PATCH] added table for VM requests --- install/mysql.sql | 15 +++++++++++++++ install/upgrades/3.1.0~a.sql | 13 +++++++++++++ 2 files changed, 28 insertions(+) diff --git a/install/mysql.sql b/install/mysql.sql index 656909f8..adf78a7a 100644 --- a/install/mysql.sql +++ b/install/mysql.sql @@ -715,6 +715,21 @@ CREATE TABLE IF NOT EXISTS `db_servers` ( PRIMARY KEY (`id`) ) ENGINE=MyISAM COMMENT='List of the databases servers'; +-- Table for VM requests +CREATE TABLE IF NOT EXISTS `vm_history` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `ip` varchar(256) NOT NULL, + `date_start` datetime NOT NULL, + `date_end` datetime DEFAULT NULL, + `login` varchar(256) NOT NULL, + `serialized_object` TEXT NOT NULL, + `vm_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`id`), + KEY `date_end` (`date_end`), + KEY `login` (`login`) +) ENGINE=MyISAM COMMENT='VM Allocation requests'; + + CREATE TABLE IF NOT EXISTS `actions` ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, type enum ('CREATE_FILE','CREATE_DIR','DELETE','MOVE'), diff --git a/install/upgrades/3.1.0~a.sql b/install/upgrades/3.1.0~a.sql index b7d397e7..807b5fe6 100644 --- a/install/upgrades/3.1.0~a.sql +++ b/install/upgrades/3.1.0~a.sql @@ -15,3 +15,16 @@ ALTER TABLE `membres` ADD db_server_id int(10) DEFAULT NULL; -- Alter table FTP to add 'enabled' ALTER TABLE `ftpusers` ADD `enabled` boolean NOT NULL DEFAULT TRUE ; +-- New table for VM requests +CREATE TABLE IF NOT EXISTS `vm_history` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `ip` varchar(256) NOT NULL, + `date_start` datetime NOT NULL, + `date_end` datetime DEFAULT NULL, + `login` varchar(256) NOT NULL, + `serialized_object` TEXT NOT NULL, + `vm_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`id`), + KEY `date_end` (`date_end`), + KEY `login` (`login`) +) ENGINE=MyISAM COMMENT='VM Allocation requests';