changeset 228 | b0a4d179be85 |
parent 196 | 54b3e14bf19d |
parent 225 | b9a8a993f4e7 |
child 266 | 917dcc6c4ceb |
197:90b7a52bea45 | 228:b0a4d179be85 |
---|---|
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 CREATE TABLE {{TABLE_PREFIX}}language( lang_id smallint(5) NOT NULL auto_increment, lang_code varchar(16) NOT NULL, lang_name_default varchar(64) NOT NULL, lang_name_native varchar(64) NOT NULL, last_changed int(12) NOT NULL DEFAULT 0, PRIMARY KEY ( lang_id ) ) CHARACTER SET `utf8`; |
|
13 CREATE TABLE {{TABLE_PREFIX}}language_strings( string_id bigint(15) NOT NULL auto_increment, lang_id smallint(5) NOT NULL, string_category varchar(32) NOT NULL, string_name varchar(64) NOT NULL, string_content longtext NOT NULL, PRIMARY KEY ( string_id ) ); |
|
14 ALTER TABLE {{TABLE_PREFIX}}users ADD COLUMN user_lang smallint(5) NOT NULL; |
|
15 ---END Stable1.0ToUnstable1.1--- |
|
16 ---BEGIN 1.0.2--- |
|
17 ---END 1.0.2--- |
|
7 ---BEGIN 1.0.2b1--- |
18 ---BEGIN 1.0.2b1--- |
8 -- This is really optional, but could reduce confusion if regex page groups get truncated for no apparent reason. |
19 -- 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; |
20 ALTER TABLE {{TABLE_PREFIX}}page_groups MODIFY COLUMN pg_target text DEFAULT NULL; |
10 ---END 1.0.2b1--- |
21 ---END 1.0.2b1--- |
11 ---BEGIN 1.0.1.1--- |
22 ---BEGIN 1.0.1.1--- |
84 UPDATE {{TABLE_PREFIX}}themes SET theme_order=2 WHERE theme_id='oxygen'; |
95 UPDATE {{TABLE_PREFIX}}themes SET theme_order=2 WHERE theme_id='oxygen'; |
85 UPDATE {{TABLE_PREFIX}}users SET theme='stpatty',style='shamrock'; |
96 UPDATE {{TABLE_PREFIX}}users SET theme='stpatty',style='shamrock'; |
86 ---END 1.0b4--- |
97 ---END 1.0b4--- |
87 ---BEGIN 1.0b3--- |
98 ---BEGIN 1.0b3--- |
88 INSERT INTO {{TABLE_PREFIX}}config(config_name, config_value) VALUES( 'allowed_mime_types', 'cbf:len=168;crc=c3dcad3f;data=0[1],1[4],0[3],1[1],0[2],1[1],0[11],1[1],0[7],1[1],0[9],1[1],0[6],1[3],0[10],1[1],0[2],1[2],0[1],1[1],0[1],1[2],0[6],1[3],0[1],1[1],0[2],1[4],0[1],1[2],0[3],1[1],0[4],1[2],0[26],1[5],0[6],1[2],0[2],1[1],0[4],1[1],0[10],1[2],0[1],1[1],0[6]|end' ); |
99 INSERT INTO {{TABLE_PREFIX}}config(config_name, config_value) VALUES( 'allowed_mime_types', 'cbf:len=168;crc=c3dcad3f;data=0[1],1[4],0[3],1[1],0[2],1[1],0[11],1[1],0[7],1[1],0[9],1[1],0[6],1[3],0[10],1[1],0[2],1[2],0[1],1[1],0[1],1[2],0[6],1[3],0[1],1[1],0[2],1[4],0[1],1[2],0[3],1[1],0[4],1[2],0[26],1[5],0[6],1[2],0[2],1[1],0[4],1[1],0[10],1[2],0[1],1[1],0[6]|end' ); |
100 ALTER TABLE {{TABLE_PREFIX}}privmsgs ADD COLUMN message_read tinyint(1) NOT NULL DEFAULT 0; |
|
89 ---END 1.0b3--- |
101 ---END 1.0b3--- |
90 ---BEGIN 1.0b2--- |
102 ---BEGIN 1.0b2--- |
91 -- 10/1: Removed alterations to users table, moved to upgrade.php, to allow the session manager to work |
103 -- 10/1: Removed alterations to users table, moved to upgrade.php, to allow the session manager to work |
92 CREATE TABLE {{TABLE_PREFIX}}privmsgs( message_id int(15) NOT NULL auto_increment, message_from varchar(63), message_to varchar(255), date int(12), subject varchar(63), message_text text, folder_name varchar(63), PRIMARY KEY (message_id) ); |
104 CREATE TABLE {{TABLE_PREFIX}}privmsgs( message_id int(15) NOT NULL auto_increment, message_from varchar(63), message_to varchar(255), date int(12), subject varchar(63), message_text text, folder_name varchar(63), PRIMARY KEY (message_id) ); |
93 CREATE TABLE {{TABLE_PREFIX}}buddies( buddy_id int(15) NOT NULL auto_increment, user_id mediumint(8), buddy_user_id mediumint(8), is_friend tinyint(1) NOT NULL DEFAULT 1, PRIMARY KEY (buddy_id) ); |
105 CREATE TABLE {{TABLE_PREFIX}}buddies( buddy_id int(15) NOT NULL auto_increment, user_id mediumint(8), buddy_user_id mediumint(8), is_friend tinyint(1) NOT NULL DEFAULT 1, PRIMARY KEY (buddy_id) ); |