2013-02-21 08:05:38 +00:00
|
|
|
-- New table for the MySQL servers
|
|
|
|
CREATE TABLE IF NOT EXISTS `db_servers` (
|
|
|
|
`id` int(10) unsigned NOT NULL auto_increment,
|
|
|
|
`name` varchar(255) NOT NULL,
|
|
|
|
`host` varchar(255) NOT NULL,
|
|
|
|
`login` varchar(255) NOT NULL,
|
|
|
|
`password` varchar(255) NOT NULL,
|
|
|
|
`client` varchar(255) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=MyISAM COMMENT='List of the databases servers';
|
|
|
|
|
|
|
|
-- Alter table membres to add
|
|
|
|
ALTER TABLE `membres` ADD db_server_id int(10) DEFAULT NULL;
|
|
|
|
|
2013-03-01 07:52:50 +00:00
|
|
|
-- Alter table FTP to add 'enabled'
|
|
|
|
ALTER TABLE `ftpusers` ADD `enabled` boolean NOT NULL DEFAULT TRUE ;
|
|
|
|
|
2013-04-21 09:27:59 +00:00
|
|
|
-- 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,
|
2013-04-21 15:02:08 +00:00
|
|
|
`date_start` datetime NOT NULL,
|
2013-04-21 09:27:59 +00:00
|
|
|
`date_end` datetime DEFAULT NULL,
|
2013-04-21 15:02:08 +00:00
|
|
|
`uid` int(10) unsigned NOT NULL,
|
2013-04-21 09:27:59 +00:00
|
|
|
`serialized_object` TEXT NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `date_end` (`date_end`),
|
2013-04-21 15:02:08 +00:00
|
|
|
KEY `uid` (`uid`)
|
2013-04-21 09:27:59 +00:00
|
|
|
) ENGINE=MyISAM COMMENT='VM Allocation requests';
|
2013-05-17 16:05:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `actions` (
|
|
|
|
id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
2014-03-07 12:48:16 +00:00
|
|
|
type enum ('CREATE_FILE','FIX_USER','CREATE_DIR','DELETE','MOVE','FIX_DIR','FIX_FILE'),
|
2013-05-17 16:05:39 +00:00
|
|
|
parameters longtext default NULL,
|
|
|
|
creation timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
begin timestamp,
|
|
|
|
end timestamp,
|
|
|
|
user varchar(255) default NULL,
|
|
|
|
status int(8) unsigned default NULL,
|
|
|
|
PRIMARY KEY ( `id` )
|
|
|
|
) ENGINE=MyISAM COMMENT = 'generic actions';
|
2013-07-03 12:13:08 +00:00
|
|
|
|
|
|
|
-- Alter table domaines to add zone ttl field
|
|
|
|
ALTER TABLE `domaines` ADD zonettl int(10) unsigned NOT NULL default '86400';
|
|
|
|
|
2013-07-24 14:49:23 +00:00
|
|
|
-- Alter table sub_domaines pour contenir au nouveau schema
|
|
|
|
alter table sub_domaines drop primary key;
|
|
|
|
alter table sub_domaines add UNIQUE (compte,domaine,sub,type,valeur);
|
|
|
|
alter table sub_domaines add id bigint(20) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;
|
|
|
|
|