source: install/scripts/upgrades/0.9.3.sql @ 498

Revision 498, 1019 bytes checked in by anarcat, 7 years ago (diff)

[project @ alternc: changeset 2005-01-18 22:18:57 by anarcat]
add persistent variables storage db structure

Original author: anarcat
Date: 2005-01-18 22:18:57

Line 
1-- add support for .it
2INSERT IGNORE INTO tld VALUES ('it', 1);
3INSERT IGNORE INTO tld VALUES ('ws', 1);
4
5-- add the new variable table
6CREATE TABLE variable (
7  name varchar(48) NOT NULL default '',
8  value longtext NOT NULL,
9  PRIMARY KEY  (name)
10) TYPE=MyISAM;
11
12USE mysql;
13
14-- In AlternC 0.9.3, the GRANTS were created with the wrong Db
15-- pattern: the underscores were not escaped.
16
17-- this allowed the user to create extra tables not under alternc's
18-- quota controls since the underscore is a wildcard in MySQL.
19
20-- the database creation and deletion code has been update, so the
21-- grants themselves need to be modified otherwise the AlternC
22-- deletion code will fail and produce evil errors
23UPDATE `db` set `Db` = REPLACE(`Db`,'_','\_') WHERE `Db` REGEXP '[^\\]_';
24
25-- make sure this has an effect at all.
26FLUSH PRIVILEGES;
27
28-- remove the old "estelle" default mx in older tables
29ALTER TABLE `domaines` MODIFY `mx` varchar(64) DEFAULT NULL;
30ALTER TABLE `domaines_standby` MODIFY `mx` varchar(64) DEFAULT NULL;
Note: See TracBrowser for help on using the repository browser.