Update of /cvsroot/php-blog/serendipity/sql
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23021/sql
Modified Files:
db.sql
Added Files:
db_update_0.6.4_0.6.5_mysql.sql
db_update_0.6.4_0.6.5_postgres.sql
Log Message:
Great patch by Evan nemerson: Subcategories, post to multiple categories, threaded comments.
My basic tests left no problems or issues with it, but make sure you update your databases when testing!
--- NEW FILE: db_update_0.6.4_0.6.5_mysql.sql ---
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;
create table {PREFIX}entrycat (
entryid int(11) not null,
categoryid int(11) not null
);
INSERT INTO {PREFIX}entrycat (entryid, categoryid) SELECT id, categoryid FROM {PREFIX}entries;
ALTER TABLE {PREFIX}entries DROP categoryid;
ALTER TABLE {PREFIX}comments ADD parent_id int(10) {UNSIGNED} default '0' not null;
Index: db.sql
===================================================================
RCS file: /cvsroot/php-blog/serendipity/sql/db.sql,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- db.sql 26 May 2004 17:02:35 -0000 1.9
+++ db.sql 7 Jun 2004 14:22:48 -0000 1.10
@@ -20,6 +20,7 @@
create table {PREFIX}comments (
id {AUTOINCREMENT} {PRIMARY},
entry_id int(10) {UNSIGNED} not null default '0',
+ parent_id int(10) {UNSIGNED} not null default '0',
timestamp int(10) {UNSIGNED} default null,
title varchar(150) default null,
author varchar(80) default null,
@@ -150,7 +151,9 @@
category_name varchar(255) default NULL,
category_icon varchar(255) default NULL,
category_description text,
- authorid int(11) default NULL
+ authorid int(11) default NULL,
+ category_left int(11) default '0',
+ category_right int(11) default '0'
);
CREATE TABLE {PREFIX}images (
@@ -167,4 +170,9 @@
path text
);
+CREATE TABLE {PREFIX}entrycat (
+ entryid int(11) not null,
+ categoryid int(11) not null
+);
+
CREATE {FULLTEXT} INDEX pathkey on {PREFIX}images (path);
--- NEW FILE: db_update_0.6.4_0.6.5_postgres.sql ---
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;
create table {PREFIX}entrycat (
entryid int(11) not null,
categoryid int(11) not null
);
INSERT INTO {PREFIX}entrycat (entryid, categoryid) (SELECT id, categoryid FROM {PREFIX}entries);
ALTER TABLE {PREFIX}entries DROP categoryid;
ALTER TABLE {PREFIX}comments ADD parent_id int(10) {UNSIGNED} not null default '0';
|