Update of /cvsroot/php-blog/serendipity/sql
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19153/sql
Modified Files:
db.sql db_update_0.6_0.6.1_mysql.sql
db_update_0.6_0.6.1_postgres.sql
Log Message:
PGSql does not allow unlimited text-indices or duplicate index names on ANY
table of a database. Isn't that sweet? :-)
As I don't know a cool method to fix existing keys (apart from jtates method
of using the 0.7 update file) I'll leave it fixed only for fresh or > 0.6.9
update installations. CVS users should have means to fix it themselves; for
MySQL the index names impose no problem.
Index: db_update_0.6_0.6.1_mysql.sql
===================================================================
RCS file: /cvsroot/php-blog/serendipity/sql/db_update_0.6_0.6.1_mysql.sql,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- db_update_0.6_0.6.1_mysql.sql 13 Oct 2004 08:57:52 -0000 1.3
+++ db_update_0.6_0.6.1_mysql.sql 2 Nov 2004 09:07:06 -0000 1.4
@@ -3,13 +3,13 @@
UPDATE {PREFIX}authors SET userlevel = 1 WHERE authorid > 1;
ALTER TABLE {PREFIX}config ADD authorid INT UNSIGNED NOT NULL DEFAULT '0';
-CREATE INDEX authorid_idx ON {PREFIX}config (authorid);
+CREATE INDEX configauthorid_idx ON {PREFIX}config (authorid);
ALTER TABLE {PREFIX}config DROP PRIMARY KEY;
ALTER TABLE {PREFIX}config ADD PRIMARY KEY (name, authorid);
ALTER TABLE {PREFIX}plugins ADD authorid INT UNSIGNED DEFAULT '0';
-CREATE INDEX authorid_idx ON {PREFIX}plugins (authorid);
+CREATE INDEX pluginauthorid_idx ON {PREFIX}plugins (authorid);
ALTER TABLE {PREFIX}images ADD authorid INT UNSIGNED DEFAULT '0';
-CREATE INDEX authorid_idx ON {PREFIX}images (authorid);
+CREATE INDEX imagesauthorid_idx ON {PREFIX}images (authorid);
Index: db.sql
===================================================================
RCS file: /cvsroot/php-blog/serendipity/sql/db.sql,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- db.sql 1 Nov 2004 14:11:27 -0000 1.21
+++ db.sql 2 Nov 2004 09:07:05 -0000 1.22
@@ -65,8 +65,8 @@
moderate_comments {BOOLEAN}
);
-#Creating an index on the body and extended body is a bad idea
-CREATE {FULLTEXT} INDEX entry_idx on {PREFIX}entries (title,body,extended);
+# FULLTEXT_MYSQL is ignored on all Non-MySQL setups (SQLite, PostgreSQL)
+CREATE {FULLTEXT_MYSQL} INDEX entry_idx on {PREFIX}entries (title,body,extended);
CREATE INDEX date_idx ON {PREFIX}entries (timestamp);
CREATE INDEX mod_idx ON {PREFIX}entries (last_modified);
@@ -123,7 +123,7 @@
authorid int(11) default '0'
);
-CREATE INDEX authorid_idx ON {PREFIX}config (authorid);
+CREATE INDEX configauthorid_idx ON {PREFIX}config (authorid);
CREATE TABLE {PREFIX}suppress (
ip varchar(15) default NULL,
@@ -145,7 +145,7 @@
PRIMARY KEY(name)
);
-CREATE INDEX authorid_idx ON {PREFIX}config (authorid);
+CREATE INDEX pluginauthorid_idx ON {PREFIX}plugins (authorid);
CREATE TABLE {PREFIX}category (
categoryid {AUTOINCREMENT} {PRIMARY},
@@ -172,6 +172,7 @@
path text
);
+CREATE INDEX imagesauthorid_idx ON {PREFIX}images (authorid);
CREATE {FULLTEXT} INDEX pathkey_idx on {PREFIX}images (path);
CREATE TABLE {PREFIX}entrycat (
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.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- db_update_0.6_0.6.1_postgres.sql 13 Oct 2004 08:57:52 -0000 1.4
+++ db_update_0.6_0.6.1_postgres.sql 2 Nov 2004 09:07:06 -0000 1.5
@@ -8,15 +8,15 @@
UPDATE {PREFIX}config SET authorid=0;
ALTER TABLE {PREFIX}config ALTER COLUMN authorid SET NOT NULL;
ALTER TABLE {PREFIX}config ALTER COLUMN authorid SET DEFAULT '0';
-CREATE INDEX authorid_idx ON {PREFIX}config (authorid);
+CREATE INDEX configauthorid_idx ON {PREFIX}config (authorid);
ALTER TABLE {PREFIX}config DROP CONSTRAINT {PREFIX}config_pkey;
ALTER TABLE {PREFIX}config ADD PRIMARY KEY (name, authorid);
ALTER TABLE {PREFIX}plugins ADD COLUMN authorid INT;
ALTER TABLE {PREFIX}plugins ALTER COLUMN authorid SET DEFAULT '0';
-CREATE INDEX authorid_idx ON {PREFIX}plugins (authorid);
+CREATE INDEX pluginsauthorid_idx ON {PREFIX}plugins (authorid);
ALTER TABLE {PREFIX}images ADD COLUMN authorid INT;
ALTER TABLE {PREFIX}images ALTER COLUMN authorid SET DEFAULT '0';
-CREATE INDEX authorid_idx ON {PREFIX}images (authorid);
+CREATE INDEX imagesauthorid_idx ON {PREFIX}images (authorid);
|