[fix] fixing mysql.sql for Stretch (compatible with previous version)
This commit is contained in:
parent
c10bbb05b8
commit
474bdbd4ae
|
@ -242,7 +242,7 @@ CREATE TABLE IF NOT EXISTS `address` (
|
||||||
`update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- Update date, for technical usage only.
|
`update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- Update date, for technical usage only.
|
||||||
`mail_action` enum('OK','DELETE','DELETING') NOT NULL default 'OK', -- mail_action is DELETE or DELETING when deleting a mailbox by cron
|
`mail_action` enum('OK','DELETE','DELETING') NOT NULL default 'OK', -- mail_action is DELETE or DELETING when deleting a mailbox by cron
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE INDEX `fk_domain_id` (`domain_id`,`address`)
|
UNIQUE INDEX `fk_domain_id` (`domain_id`,`address`(190))
|
||||||
) ENGINE=InnoDB COMMENT = 'This is the main address table. It represents an address as in RFC2822';
|
) ENGINE=InnoDB COMMENT = 'This is the main address table. It represents an address as in RFC2822';
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -312,7 +312,7 @@ INSERT IGNORE INTO defquotas (quota,value) VALUES ('mysql',1);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS forbidden_domains (
|
CREATE TABLE IF NOT EXISTS forbidden_domains (
|
||||||
domain varchar(255) NOT NULL default '',
|
domain varchar(255) NOT NULL default '',
|
||||||
PRIMARY KEY (domain)
|
PRIMARY KEY (domain(190))
|
||||||
) ENGINE=InnoDB COMMENT='forbidden domains to install';
|
) ENGINE=InnoDB COMMENT='forbidden domains to install';
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -345,6 +345,7 @@ INSERT IGNORE INTO forbidden_domains VALUES ('yahoo.fr');
|
||||||
INSERT IGNORE INTO forbidden_domains VALUES ('gmail.com');
|
INSERT IGNORE INTO forbidden_domains VALUES ('gmail.com');
|
||||||
INSERT IGNORE INTO forbidden_domains VALUES ('orange.fr');
|
INSERT IGNORE INTO forbidden_domains VALUES ('orange.fr');
|
||||||
INSERT IGNORE INTO forbidden_domains VALUES ('sfr.fr');
|
INSERT IGNORE INTO forbidden_domains VALUES ('sfr.fr');
|
||||||
|
INSERT IGNORE INTO forbidden_domains VALUES ('free.fr');
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Structure de la table `tld`
|
-- Structure de la table `tld`
|
||||||
|
@ -427,7 +428,7 @@ CREATE TABLE IF NOT EXISTS `size_web` (
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `size_db` (
|
CREATE TABLE IF NOT EXISTS `size_db` (
|
||||||
`db` varchar(255) NOT NULL default '',
|
`db` varchar(128) NOT NULL default '',
|
||||||
`size` int(10) unsigned NOT NULL default '0',
|
`size` int(10) unsigned NOT NULL default '0',
|
||||||
`ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
`ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
PRIMARY KEY (`db`),
|
PRIMARY KEY (`db`),
|
||||||
|
@ -440,7 +441,7 @@ CREATE TABLE IF NOT EXISTS `size_mailman` (
|
||||||
`uid` int(11) NOT NULL default '0',
|
`uid` int(11) NOT NULL default '0',
|
||||||
`size` int(10) unsigned NOT NULL default '0',
|
`size` int(10) unsigned NOT NULL default '0',
|
||||||
`ts` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
`ts` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||||
PRIMARY KEY (`list`),
|
PRIMARY KEY (`list`(190)),
|
||||||
KEY `ts` (`ts`),
|
KEY `ts` (`ts`),
|
||||||
KEY `uid` (`uid`)
|
KEY `uid` (`uid`)
|
||||||
) ENGINE=InnoDB COMMENT='Mailman Lists used space';
|
) ENGINE=InnoDB COMMENT='Mailman Lists used space';
|
||||||
|
@ -700,7 +701,7 @@ CREATE TABLE IF NOT EXISTS `default_subdomains` (
|
||||||
`concerned` enum('BOTH','MAIN','SLAVE') NOT NULL DEFAULT 'MAIN',
|
`concerned` enum('BOTH','MAIN','SLAVE') NOT NULL DEFAULT 'MAIN',
|
||||||
`enabled` boolean not null default true,
|
`enabled` boolean not null default true,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `unique_row` (`sub`,`domain_type`,`domain_type_parameter`,`concerned`)
|
UNIQUE KEY `unique_row` (`sub`(60),`domain_type`,`domain_type_parameter`(60),`concerned`)
|
||||||
) ENGINE=InnoDB COMMENT='Contains the defaults subdomains created on domains creation';
|
) ENGINE=InnoDB COMMENT='Contains the defaults subdomains created on domains creation';
|
||||||
|
|
||||||
INSERT IGNORE INTO `default_subdomains` (`sub`, `domain_type`, `domain_type_parameter`, `concerned`) VALUES
|
INSERT IGNORE INTO `default_subdomains` (`sub`, `domain_type`, `domain_type_parameter`, `concerned`) VALUES
|
||||||
|
|
|
@ -62,7 +62,7 @@ for file in $( ls $extensions | sort -n ) ; do
|
||||||
upvers=`strip_ext $file`
|
upvers=`strip_ext $file`
|
||||||
# the extension
|
# the extension
|
||||||
ext=`get_ext $file`
|
ext=`get_ext $file`
|
||||||
if dpkg --compare-versions $upvers gt $oldvers; then
|
if dpkg --compare-versions "$upvers" gt "$oldvers"; then
|
||||||
echo "Running upgrade script $file"
|
echo "Running upgrade script $file"
|
||||||
# run the proper program to interpret the upgrade script
|
# run the proper program to interpret the upgrade script
|
||||||
case "$ext" in
|
case "$ext" in
|
||||||
|
|
Loading…
Reference in New Issue