Update of /cvsroot/php-blog/serendipity/sql
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21261/sql
Modified Files:
db_update_0.6.1_0.6.2_postgres.sql
db_update_0.6.2_0.6.3_postgres.sql
db_update_0.6.3_0.6.4_postgres.sql
db_update_0.6.4_0.6.5_postgres.sql
db_update_0.6.6_0.6.7_postgres.sql
db_update_0.6.8_0.6.9_postgres.sql
db_update_0.6_0.6.1_postgres.sql
Log Message:
several pgsql fixes
Index: db_update_0.6.4_0.6.5_postgres.sql
===================================================================
RCS file: /cvsroot/php-blog/serendipity/sql/db_update_0.6.4_0.6.5_postgres.sql,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- db_update_0.6.4_0.6.5_postgres.sql 7 Jun 2004 14:22:48 -0000 1.1
+++ db_update_0.6.4_0.6.5_postgres.sql 6 Sep 2004 09:15:32 -0000 1.2
@@ -1,15 +1,21 @@
-ALTER TABLE {PREFIX}category
- ADD parentid INT(11) DEFAULT '0' NOT NULL,
- ADD category_left INT(11) DEFAULT '0' NOT NULL,
- ADD category_right INT(11) DEFAULT '0' NOT NULL;
+ALTER TABLE {PREFIX}category ADD COLUMN parentid INT4;
+ALTER TABLE {PREFIX}category ADD COLUMN category_left INT4;
+ALTER TABLE {PREFIX}category ADD COLUMN category_right INT4;
+UPDATE {PREFIX}category SET parentid=0, category_left=0, category_right=0;
-create table {PREFIX}entrycat (
- entryid int(11) not null,
- categoryid int(11) not null
+ALTER TABLE {PREFIX}category ALTER COLUMN parentid SET NOT NULL;
+ALTER TABLE {PREFIX}category ALTER COLUMN category_left SET NOT NULL;
+ALTER TABLE {PREFIX}category ALTER COLUMN category_right SET NOT NULL;
+
+CREATE TABLE {PREFIX}entrycat (
+ entryid int4 not null,
+ categoryid int4 not null
);
-INSERT INTO {PREFIX}entrycat (entryid, categoryid) (SELECT id, categoryid FROM {PREFIX}entries);
+INSERT INTO {PREFIX}entrycat (entryid, categoryid) (SELECT id, categoryid FROM {PREFIX}entries);
-ALTER TABLE {PREFIX}entries DROP categoryid;
+ALTER TABLE {PREFIX}entries DROP COLUMN categoryid;
-ALTER TABLE {PREFIX}comments ADD parent_id int(10) {UNSIGNED} not null default '0';
+ALTER TABLE {PREFIX}comments ADD COLUMN parent_id int4;
+UPDATE {PREFIX}comments SET parent_id=0;
+ALTER TABLE {PREFIX}comments ALTER COLUMN parent_id SET NOT NULL;
Index: db_update_0.6.8_0.6.9_postgres.sql
===================================================================
RCS file: /cvsroot/php-blog/serendipity/sql/db_update_0.6.8_0.6.9_postgres.sql,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- db_update_0.6.8_0.6.9_postgres.sql 19 Jul 2004 09:31:52 -0000 1.1
+++ db_update_0.6.8_0.6.9_postgres.sql 6 Sep 2004 09:15:32 -0000 1.2
@@ -1,7 +1,9 @@
-ALTER TABLE {PREFIX}images ADD oldmime varchar(15) not null default '';
+ALTER TABLE {PREFIX}images ADD COLUMN oldmime varchar(15)
UPDATE {PREFIX}images SET oldmime = mime;
ALTER TABLE {PREFIX}images DROP mime;
-ALTER TABLE {PREFIX}images ADD mime varchar(255) not null default '';
+ALTER TABLE {PREFIX}images ADD COLUMN mime varchar(255);
UPDATE {PREFIX}images SET mime = oldmime;
-ALTER TABLE {PREFIX}images DROP oldmime;
+ALTER TABLE {PREFIX}images DROP COLUMN oldmime;
+ALTER TABLE {PREFIX}images ALTER COLUMN mime SET NOT NULL;
+
Index: db_update_0.6.2_0.6.3_postgres.sql
===================================================================
RCS file: /cvsroot/php-blog/serendipity/sql/db_update_0.6.2_0.6.3_postgres.sql,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- db_update_0.6.2_0.6.3_postgres.sql 26 May 2004 17:02:35 -0000 1.3
+++ db_update_0.6.2_0.6.3_postgres.sql 6 Sep 2004 09:15:32 -0000 1.4
@@ -1,2 +1,4 @@
-ALTER TABLE {PREFIX}images ADD COLUMN path text DEFAULT '/';
+ALTER TABLE {PREFIX}images ADD COLUMN path text;
+ALTER TABLE {PREFIX}images ALTER COLUMN path SET DEFAULT '/';
+UPDATE {PREFIX}images SET path = '/';
CREATE {FULLTEXT} INDEX pathkey on {PREFIX}images (path);
Index: db_update_0.6.3_0.6.4_postgres.sql
===================================================================
RCS file: /cvsroot/php-blog/serendipity/sql/db_update_0.6.3_0.6.4_postgres.sql,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- db_update_0.6.3_0.6.4_postgres.sql 26 May 2004 17:02:35 -0000 1.1
+++ db_update_0.6.3_0.6.4_postgres.sql 6 Sep 2004 09:15:32 -0000 1.2
@@ -1,3 +1,3 @@
-ALTER TABLE {PREFIX}authors ADD COLUMN right_publish int(1);
+ALTER TABLE {PREFIX}authors ADD COLUMN right_publish int2;
ALTER TABLE {PREFIX}authors ALTER COLUMN right_publish SET DEFAULT '1';
UPDATE {PREFIX}authors SET right_publish=1;
Index: db_update_0.6.6_0.6.7_postgres.sql
===================================================================
RCS file: /cvsroot/php-blog/serendipity/sql/db_update_0.6.6_0.6.7_postgres.sql,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- db_update_0.6.6_0.6.7_postgres.sql 17 Jul 2004 12:01:02 -0000 1.2
+++ db_update_0.6.6_0.6.7_postgres.sql 6 Sep 2004 09:15:32 -0000 1.3
@@ -1,3 +1,7 @@
-ALTER TABLE {PREFIX}entries ADD moderate_comments BOOLEAN NOT NULL;
-ALTER TABLE {PREFIX}comments ADD status varchar(50) not null;
+ALTER TABLE {PREFIX}entries ADD COLUMN moderate_comments BOOLEAN;
+ALTER TABLE {PREFIX}comments ADD COLUMN status varchar(50);
UPDATE {PREFIX}comments SET status = 'approved';
+UPDATE {PREFIX}entries SET moderate_comments = false;
+ALTER TABLE {PREFIX}entries ALTER COLUMN moderate_comments SET NOT NULL;
+ALTER TABLE {PREFIX}comments ALTER COLUMN status SET NOT NULL;
+
Index: db_update_0.6.1_0.6.2_postgres.sql
===================================================================
RCS file: /cvsroot/php-blog/serendipity/sql/db_update_0.6.1_0.6.2_postgres.sql,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- db_update_0.6.1_0.6.2_postgres.sql 28 Apr 2004 15:02:25 -0000 1.1
+++ db_update_0.6.1_0.6.2_postgres.sql 6 Sep 2004 09:15:32 -0000 1.2
@@ -1 +1 @@
-ALTER TABLE {PREFIX}category ADD COLUMN category_icon varchar(255) DEFAULT NULL after `category_name`;
+ALTER TABLE {PREFIX}category ADD COLUMN category_icon varchar(255);
Index: db_update_0.6_0.6.1_postgres.sql
===================================================================
RCS file: /cvsroot/php-blog/serendipity/sql/db_update_0.6_0.6.1_postgres.sql,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- db_update_0.6_0.6.1_postgres.sql 11 Apr 2004 05:03:27 -0000 1.2
+++ db_update_0.6_0.6.1_postgres.sql 6 Sep 2004 09:15:32 -0000 1.3
@@ -1,5 +1,5 @@
-ALTER TABLE {PREFIX}authors ADD userlevel SMALLINT;
+ALTER TABLE {PREFIX}authors ADD COLUMN userlevel SMALLINT;
ALTER TABLE {PREFIX}authors ALTER COLUMN userlevel SET DEFAULT '0';
UPDATE {PREFIX}authors SET userlevel = 255 WHERE authorid = 1;
UPDATE {PREFIX}authors SET userlevel = 1 WHERE authorid > 1;
|