source: alternc/trunk/install/upgrades/1.0.sql @ 2891

Revision 2891, 3.1 KB checked in by benjamin, 2 years ago (diff)

terminologie pour les types de domaine : correction. Traduction ok pour les types par defaut ...

Line 
1-- Alter table to allow use of ipv6, cname and txt in dns record
2ALTER TABLE sub_domaines DROP PRIMARY KEY;
3ALTER TABLE sub_domaines ADD CONSTRAINT pk_SubDomaines PRIMARY KEY (compte,domaine,sub,type,valeur);
4
5-- Alter table mail_domain to add support of temporary mail
6ALTER TABLE mail_domain ADD expiration_date datetime DEFAULT null;
7
8-- Domains type
9CREATE TABLE IF NOT EXISTS `domaines_type` (
10    `name` VARCHAR (255) NOT NULL, -- Uniq name
11    `description` TEXT, -- Human description
12    `target` enum ('NONE', 'URL', 'DIRECTORY', 'IP', 'IPV6', 'DOMAIN', 'TXT') NOT NULL DEFAULT 'NONE', -- Target type
13    `entry` VARCHAR (255) DEFAULT '', -- BIND entry
14    `compatibility` VARCHAR (255) DEFAULT '', -- Which type can be on the same subdomains
15    `enable` enum ('ALL', 'NONE', 'ADMIN') NOT NULL DEFAULT 'ALL', -- Show this option to who ?
16    `only_dns` BOOLEAN DEFAULT FALSE, -- Update_domains modify just the dns, no web configuration
17    `need_dns` BOOLEAN DEFAULT TRUE, -- The server need to be the DNS to allow this service
18    `advanced` BOOLEAN DEFAULT TRUE, -- It's an advanced option
19PRIMARY KEY ( `name` )
20) COMMENT = 'Type of domains allowed';
21
22INSERT IGNORE INTO `domaines_type` (name, description, target, entry, compatibility, only_dns, need_dns, advanced) values
23('vhost','Locally hosted', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@', 'txt', false, false, false),
24('url','URL redirection', 'URL', '%SUB% IN A @@PUBLIC_IP@@','txt', true, true, false),
25('ip','IPv4 redirect', 'IP', '%SUB% IN A %TARGET%','url,ip,ipv6,txt', false, true, false),
26('webmail', 'Webmail access', 'NONE', '%SUB% IN A @@PUBLIC_IP@@', 'txt', false, false, false),
27('ipv6','IPv6 redirect', 'IPV6', '%SUB% IN AAAA %TARGET%','ip,ipv6,webmail,txt',true, true, true ),
28('cname', 'CNAME DNS entry', 'DOMAIN', '%SUB% CNAME %TARGET%', 'txt',true, true, true ),
29('txt', 'TXT DNS entry', 'TXT', '%SUB% IN TXT "%TARGET%"','vhost,url,ip,webmail,ipv6,cname,txt,mx',true, true, true),
30('mx', 'MX DNS entry', 'IP', '%SUB% IN MX 5 %TARGET%', 'vhost,url,ip,webmail,ipv6,cname,txt,mx',true, false, true),
31('panel', 'AlternC panel access', 'NONE', '%SUB% IN A @@PUBLIC_IP@@', 'vhost,url,ip,webmail,ipv6,cname,txt',true, false, true)
32;
33
34-- Changing standby use
35alter table domaines add column dns_action enum ('OK','UPDATE','DELETE') NOT NULL default 'UPDATE';
36alter table domaines add column dns_result varchar(255) not null default '';
37alter table sub_domaines add column web_action enum ('OK','UPDATE','DELETE') NOT NULL default 'UPDATE';
38alter table sub_domaines add column web_result varchar(255) not null default '';
39alter table sub_domaines add column enable enum ('ENABLED', 'ENABLE', 'DISABLED', 'DISABLE') NOT NULL DEFAULT 'ENABLED';
40drop table sub_domaines_standby;
41drop table domaines_standby;
42
43update sub_domaines set type='VHOST' where type='0'; -- We decide to drop massvhost.
44update sub_domaines set type='URL' where type='1';
45update sub_domaines set type='IP' where type='2';
46update sub_domaines set type='WEBMAIL' where type='3';
47update sub_domaines set type='IPV6' where type='4';
48update sub_domaines set type='CNAME' where type='5';
49update sub_domaines set type='TXT' where type='6';
50update sub_domaines set web_action='UPDATE';
51
Note: See TracBrowser for help on using the repository browser.