add ` everywhere on sql upgrades scripts

This commit is contained in:
Benjamin Sonntag 2009-04-22 18:50:55 +00:00
parent f3b7df4c49
commit 6b6cbf5b63
4 changed files with 16 additions and 17 deletions

View File

@ -1,6 +1,6 @@
-- add support for .it
INSERT IGNORE INTO tld VALUES ('it', 1);
INSERT IGNORE INTO tld VALUES ('ws', 1);
INSERT IGNORE INTO `tld` VALUES ('it', 1);
INSERT IGNORE INTO `tld` VALUES ('ws', 1);
-- remove the old "estelle" default mx in older tables
ALTER TABLE `domaines` MODIFY `mx` varchar(64) DEFAULT NULL;
@ -10,16 +10,15 @@ ALTER TABLE `domaines_standby` MODIFY `mx` varchar(64) DEFAULT NULL;
--
-- if comment is null, then the variable is internal and will not show
-- up in the generic configuration panel
CREATE TABLE IF NOT EXISTS variable (
name varchar(48) NOT NULL default '',
value longtext NOT NULL,
comment mediumtext NULL,
PRIMARY KEY (name),
KEY name (name)
CREATE TABLE IF NOT EXISTS `variable` (
`name` varchar(48) NOT NULL default '',
`value` longtext NOT NULL,
`comment` mediumtext NULL,
PRIMARY KEY (`name`)
) TYPE=MyISAM;
-- hosting_tld: only used, for now, in bureau/admin/adm_*add.php
INSERT IGNORE INTO `variable` (name, value, comment) VALUES ('hosting_tld', 0,
INSERT IGNORE INTO `variable` (`name`, `value`, `comment`) VALUES ('hosting_tld', 0,
'This is a FQDN that designates the main hostname of the service.
For example, hosting_tld determines in what TLD the "free" user domain

View File

@ -1,8 +1,8 @@
-- Ajout du champ 'type' pour les membres
ALTER TABLE membres ADD COLUMN type varchar(128) default 'default' AFTER admlist;
ALTER TABLE `membres` ADD COLUMN `type` varchar(128) default 'default' AFTER `admlist`;
-- Ajout du champ 'type' pour les quotas par défaut
ALTER TABLE defquotas ADD COLUMN type varchar(128) default 'default' AFTER value;
ALTER TABLE `defquotas` ADD COLUMN `type` varchar(128) default 'default' AFTER `value`;
-- we don't store cleartext passwords anymore, we use saslauthd
ALTER TABLE `mail_users` DROP `sasl`;

View File

@ -1,11 +1,11 @@
-- Pour les durées de comptes
ALTER IGNORE TABLE membres ADD COLUMN created datetime default NULL AFTER type;
ALTER IGNORE TABLE membres ADD COLUMN renewed datetime default NULL AFTER created;
ALTER IGNORE TABLE membres ADD COLUMN duration int(4) default NULL AFTER renewed;
ALTER IGNORE TABLE `membres` ADD COLUMN `created` datetime default NULL AFTER `type`;
ALTER IGNORE TABLE `membres` ADD COLUMN `renewed` datetime default NULL AFTER `created`;
ALTER IGNORE TABLE `membres` ADD COLUMN `duration` int(4) default NULL AFTER `renewed`;
-- Pour l'encryptage des mots de passe ftp
ALTER IGNORE TABLE ftpusers ADD COLUMN encrypted_password VARCHAR(32) default NULL AFTER password;
UPDATE ftpusers SET encrypted_password=ENCRYPT(password) WHERE password!='';
ALTER IGNORE TABLE `ftpusers` ADD COLUMN `encrypted_password` VARCHAR(32) default NULL AFTER `password`;
UPDATE `ftpusers` SET `encrypted_password`=ENCRYPT(`password`) WHERE `password`!='';
-- --------------------------------------------------------
-- TABLES de mémorisation de la taille des dossiers web/mail/db

View File

@ -6,4 +6,4 @@ PRIMARY KEY ( `login` )
) COMMENT = 'Allowed account for secondary mx managment';
# On met les quota par defaut du nombre d'utilisateurs mysql
INSERT IGNORE INTO defquotas (quota,value) VALUES ('mysql_users',1);
INSERT IGNORE INTO defquotas (`quota`,`value`) VALUES ('mysql_users',1);