Update of /cvsroot/php-blog/serendipity/sql
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28721
Modified Files:
db.sql
Added Files:
db_update_0.6_0.6.1_mysql.sql db_update_0.6_0.6.1_pgsql.sql
Log Message:
Multi-user patch, part #2
--- NEW FILE: db_update_0.6_0.6.1_mysql.sql ---
ALTER TABLE {PREFIX}authors ADD userlevel INT(4) UNSIGNED DEFAULT '0';
UPDATE {PREFIX}authors SET userlevel = 255 WHERE authorid = 1;
UPDATE {PREFIX}authors SET userlevel = 1 WHERE authorid > 1;
ALTER TABLE {PREFIX}config ADD authorid INT UNSIGNED DEFAULT '0';
ALTER TABLE {PREFIX}config ADD INDEX (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';
ALTER TABLE {PREFIX}plugins ADD INDEX (authorid);
ALTER TABLE {PREFIX}images ADD authorid INT UNSIGNED DEFAULT '0';
ALTER TABLE {PREFIX}images ADD INDEX (authorid);
--- NEW FILE: db_update_0.6_0.6.1_pgsql.sql ---
ALTER TABLE {PREFIX}authors ADD userlevel INT(4) UNSIGNED DEFAULT '0';
UPDATE {PREFIX}authors SET userlevel = 255 WHERE authorid = 1;
UPDATE {PREFIX}authors SET userlevel = 1 WHERE authorid > 1;
ALTER TABLE {PREFIX}config ADD authorid INT UNSIGNED DEFAULT '0';
CREATE INDEX authorid ON {PREFIX}config (authorid);
DROP INDEX name ON {PREFIX}config;
CREATE INDEX pri ON {PREFIX}config (name, authorid);
ALTER TABLE {PREFIX}plugins ADD authorid INT UNSIGNED DEFAULT '0';
CREATE INDEX authorid ON {PREFIX}plugins (authorid);
ALTER TABLE {PREFIX}images ADD authorid INT UNSIGNED DEFAULT '0';
CREATE INDEX authorid ON {PREFIX}images (authorid);
Index: db.sql
===================================================================
RCS file: /cvsroot/php-blog/serendipity/sql/db.sql,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- db.sql 19 Mar 2004 11:22:46 -0000 1.5
+++ db.sql 4 Apr 2004 16:20:15 -0000 1.6
@@ -8,7 +8,8 @@
authorid {AUTOINCREMENT} {PRIMARY},
mail_comments int(1) default '1',
mail_trackbacks int(1) default '1',
- email varchar(128) not null default ''
+ email varchar(128) not null default '',
+ userlevel int(4) {UNSIGNED} not null default '0'
);
#
@@ -114,10 +115,13 @@
#
create table {PREFIX}config (
- name varchar(255) not null primary key,
- value text not null
+ name varchar(255) not null,
+ value text not null,
+ authorid int(11) default '0'
);
+CREATE INDEX authorid ON {PREFIX}config (authorid);
+
CREATE TABLE {PREFIX}suppress (
ip varchar(15) default NULL,
scheme varchar(5),
@@ -134,9 +138,12 @@
name varchar(128) not null,
placement varchar(6) not null default 'right',
sort_order int(4) not null default '0',
+ authorid int(11) default '0',
PRIMARY KEY(name)
);
+CREATE INDEX authorid ON {PREFIX}config (authorid);
+
CREATE TABLE {PREFIX}category (
categoryid {AUTOINCREMENT} {PRIMARY},
category_name varchar(255) default NULL,
@@ -153,5 +160,6 @@
dimensions_width int(11) not null default '0',
dimensions_height int(11) not null default '0',
date int(11) not null default '0',
- thumbnail_name varchar(255) not null default ''
+ thumbnail_name varchar(255) not null default '',
+ authorid int(11) default '0'
);
|