upgrade.sql
changeset 207 861807631f70
parent 180 c63c5ee6c6d6
child 209 8a00247d1dee
equal deleted inserted replaced
203:8e2fffc5c622 207:861807631f70
     1 -- Enano CMS - upgrade SQL
     1 -- Enano CMS - upgrade SQL
     2 -- Variables are in the format {{VAR_NAME}}
     2 -- Variables are in the format {{VAR_NAME}}
     3 -- ALL NON-SQL LINES, even otherwise blank lines, must start with "--" or they will get sent to MySQL!
     3 -- ALL NON-SQL LINES, even otherwise blank lines, must start with "--" or they will get sent to MySQL!
     4 -- Common tasks (version numbers)
     4 -- Common tasks (version numbers)
     5 DELETE FROM {{TABLE_PREFIX}}config WHERE config_name='enano_version' OR config_name='enano_beta_version' OR config_name='enano_alpha_version' OR config_name='enano_rc_version';
     5 DELETE FROM {{TABLE_PREFIX}}config WHERE config_name='enano_version' OR config_name='enano_beta_version' OR config_name='enano_alpha_version' OR config_name='enano_rc_version';
     6 INSERT INTO {{TABLE_PREFIX}}config (config_name, config_value) VALUES( 'enano_version', '1.0.2' );
     6 INSERT INTO {{TABLE_PREFIX}}config (config_name, config_value) VALUES( 'enano_version', '1.1.1' );
       
     7 ---BEGIN Stable1.0ToUnstable1.1---
       
     8 -- UPDATE {{TABLE_PREFIX}}groups SET group_id=9998 WHERE group_id=4;
       
     9 -- UPDATE {{TABLE_PREFIX}}group_members SET group_id=9998 WHERE group_id=4;
       
    10 -- INSERT INTO {{TABLE_PREFIX}}groups(group_id,group_name,group_type,system_group) VALUES(4, 'Regular members', 3, 1);
       
    11 CREATE TABLE {{TABLE_PREFIX}}lockout( id int(12) NOT NULL auto_increment, ipaddr varchar(40) NOT NULL, action ENUM('credential', 'level') NOT NULL DEFAULT 'credential', timestamp int(12) NOT NULL DEFAULT 0, PRIMARY KEY ( id ) ) CHARACTER SET `utf8`;
       
    12 ---END Stable1.0ToUnstable1.1---
       
    13 ---BEGIN 1.0.2---
       
    14 ---END 1.0.2---
     7 ---BEGIN 1.0.2b1---
    15 ---BEGIN 1.0.2b1---
     8 -- This is really optional, but could reduce confusion if regex page groups get truncated for no apparent reason.
    16 -- This is really optional, but could reduce confusion if regex page groups get truncated for no apparent reason.
     9 ALTER TABLE {{TABLE_PREFIX}}page_groups MODIFY COLUMN pg_target text DEFAULT NULL;
    17 ALTER TABLE {{TABLE_PREFIX}}page_groups MODIFY COLUMN pg_target text DEFAULT NULL;
    10 ---END 1.0.2b1---
    18 ---END 1.0.2b1---
    11 ---BEGIN 1.0.1.1---
    19 ---BEGIN 1.0.1.1---