Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
authorDan
Mon, 11 Feb 2008 14:05:57 -0500
changeset 410 9db359d6e60c
parent 409 267be9e394c2
child 411 d1a95497b68f
Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
install/schemas/mysql_stage2.sql
install/schemas/postgresql_stage2.sql
install/schemas/upgrade/1.1.1-1.1.2-mysql.sql
install/schemas/upgrade/1.1.1-1.1.2-postgresql.sql
--- a/install/schemas/mysql_stage2.sql	Mon Feb 11 13:55:14 2008 -0500
+++ b/install/schemas/mysql_stage2.sql	Mon Feb 11 14:05:57 2008 -0500
@@ -31,6 +31,7 @@
 ) CHARACTER SET `utf8` COLLATE `utf8_bin`;
 
 CREATE TABLE {{TABLE_PREFIX}}logs(
+  log_id int(15) NOT NULL auto_increment,
   log_type varchar(16),
   action varchar(16),
   time_id int(12) NOT NULL DEFAULT '0',
@@ -41,7 +42,8 @@
   char_tag varchar(40),
   author varchar(63),
   edit_summary text,
-  minor_edit tinyint(1)
+  minor_edit tinyint(1),
+  PRIMARY KEY ( log_id )
 ) CHARACTER SET `utf8` COLLATE `utf8_bin`;
 
 CREATE TABLE {{TABLE_PREFIX}}page_text(
--- a/install/schemas/postgresql_stage2.sql	Mon Feb 11 13:55:14 2008 -0500
+++ b/install/schemas/postgresql_stage2.sql	Mon Feb 11 14:05:57 2008 -0500
@@ -31,6 +31,7 @@
 );
 
 CREATE TABLE {{TABLE_PREFIX}}logs(
+  log_id SERIAL,
   log_type varchar(16),
   action varchar(16),
   time_id int NOT NULL default '0',
@@ -41,7 +42,8 @@
   char_tag varchar(40),
   author varchar(63),
   edit_summary text,
-  minor_edit smallint
+  minor_edit smallint,
+  PRIMARY KEY ( log_id )
 );
 
 CREATE TABLE {{TABLE_PREFIX}}page_text(
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/install/schemas/upgrade/1.1.1-1.1.2-mysql.sql	Mon Feb 11 14:05:57 2008 -0500
@@ -0,0 +1,30 @@
+-- Enano CMS
+-- Upgrade schema - Enano 1.1.1 - 1.1.2
+
+ALTER TABLE {{TABLE_PREFIX}}logs ADD COLUMN log_id int(15) NOT NULL auto_increment, ADD PRIMARY KEY ( log_id );
+
+ALTER TABLE {{TABLE_PREFIX}}users ADD COLUMN user_rank int(12) UNSIGNED NOT NULL DEFAULT 1,
+                                  ADD COLUMN user_timezone int(12) UNSIGNED NOT NULL DEFAULT 0;
+
+CREATE TABLE {{TABLE_PREFIX}}ranks(
+  rank_id int(12) NOT NULL auto_increment,
+  rank_title varchar(63) NOT NULL DEFAULT '',
+  rank_style varchar(255) NOT NULL DEFAULT '',
+  PRIMARY KEY ( rank_id )
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+CREATE TABLE {{TABLE_PREFIX}}captcha(
+  code_id int(12) NOT NULL auto_increment,
+  session_id varchar(40) NOT NULL DEFAULT '',
+  code varchar(64) NOT NULL DEFAULT '',
+  session_data text,
+  source_ip varchar(39),
+  user_id int(12),
+  PRIMARY KEY ( code_id )
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+INSERT INTO {{TABLE_PREFIX}}ranks(rank_id, rank_title, rank_style) VALUES
+  (1, 'user_rank_member', ''),
+  (2, 'user_rank_mod', 'font-weight: bold; color: #00AA00;'),
+  (3, 'user_rank_admin', 'font-weight: bold; color: #AA0000;');
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/install/schemas/upgrade/1.1.1-1.1.2-postgresql.sql	Mon Feb 11 14:05:57 2008 -0500
@@ -0,0 +1,30 @@
+-- Enano CMS
+-- Upgrade schema - Enano 1.1.1 - 1.1.2
+
+ALTER TABLE {{TABLE_PREFIX}}logs ADD COLUMN log_id SERIAL, ADD PRIMARY KEY ( log_id );
+
+ALTER TABLE {{TABLE_PREFIX}}users ADD COLUMN user_rank int NOT NULL DEFAULT 1,
+                                  ADD COLUMN user_timezone int NOT NULL DEFAULT 0;
+
+CREATE TABLE {{TABLE_PREFIX}}ranks(
+  rank_id SERIAL,
+  rank_title varchar(63) NOT NULL DEFAULT '',
+  rank_style varchar(255) NOT NULL DEFAULT '',
+  PRIMARY KEY ( rank_id )
+);
+
+CREATE TABLE {{TABLE_PREFIX}}captcha(
+  code_id SERIAL,
+  session_id varchar(40) NOT NULL DEFAULT '',
+  code varchar(64) NOT NULL DEFAULT '',
+  session_data text,
+  source_ip varchar(39),
+  user_id int(12),
+  PRIMARY KEY ( code_id )
+);
+
+INSERT INTO {{TABLE_PREFIX}}ranks(rank_id, rank_title, rank_style) VALUES
+  (1, 'user_rank_member', ''),
+  (2, 'user_rank_mod', 'font-weight: bold; color: #00AA00;'),
+  (3, 'user_rank_admin', 'font-weight: bold; color: #AA0000;');
+