Alternc  latest
Alternc logiel libre pour l'hébergement
3.1.0~a.sql
Go to the documentation of this file.
1 -- New table for the MySQL servers
2 CREATE TABLE IF NOT EXISTS `db_servers` (
3  `id` int(10) unsigned NOT NULL auto_increment,
4  `name` varchar(255) NOT NULL,
5  `host` varchar(255) NOT NULL,
6  `login` varchar(255) NOT NULL,
7  `password` varchar(255) NOT NULL,
8  `client` varchar(255) NOT NULL,
9  PRIMARY KEY (`id`)
10 ) ENGINE=MyISAM COMMENT='List of the databases servers';
11 
12 -- Alter table membres to add
13 ALTER TABLE `membres` ADD db_server_id int(10) DEFAULT NULL;
14 
15 -- Alter table FTP to add 'enabled'
16 ALTER TABLE `ftpusers` ADD `enabled` boolean NOT NULL DEFAULT TRUE ;
17 
18 -- New table for VM requests
19 CREATE TABLE IF NOT EXISTS `vm_history` (
20  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
21  `ip` varchar(256) NOT NULL,
22  `date_start` datetime NOT NULL,
23  `date_end` datetime DEFAULT NULL,
24  `uid` int(10) unsigned NOT NULL,
25  `serialized_object` TEXT NOT NULL,
26  PRIMARY KEY (`id`),
27  KEY `date_end` (`date_end`),
28  KEY `uid` (`uid`)
29 ) ENGINE=MyISAM COMMENT='VM Allocation requests';
30 
31 
32 CREATE TABLE IF NOT EXISTS `actions` (
33  id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
34  type enum ('CREATE_FILE','FIX_USER','CREATE_DIR','DELETE','MOVE','FIX_DIR','FIX_FILE'),
35  parameters longtext default NULL,
36  creation timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
37  begin timestamp,
38  end timestamp,
39  user varchar(255) default NULL,
40  status int(8) unsigned default NULL,
41  PRIMARY KEY ( `id` )
42 ) ENGINE=MyISAM COMMENT = 'generic actions';
43 
44 -- Alter table domaines to add zone ttl field
45 ALTER TABLE `domaines` ADD zonettl int(10) unsigned NOT NULL default '86400';
46 
47 -- Alter table sub_domaines pour contenir au nouveau schema
48 alter table sub_domaines drop primary key;
49 alter table sub_domaines add UNIQUE (compte,domaine,sub,type,valeur);
50 alter table sub_domaines add id bigint(20) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;
51