diff options
author | natrak <> | 2001-04-22 16:33:28 +0000 |
---|---|---|
committer | natrak <> | 2001-04-22 16:33:28 +0000 |
commit | 78bee959d1bb0536fab8345b2485d12db6f50d3f (patch) | |
tree | 04d402f73338bb61fb5735850d70397ae9d8ee07 | |
parent | 839cb3f4cb204b63365ff88a9f73a8513fd66c28 (diff) | |
download | brdo-78bee959d1bb0536fab8345b2485d12db6f50d3f.tar.gz brdo-78bee959d1bb0536fab8345b2485d12db6f50d3f.tar.bz2 |
- Fixed the update sql file. Changes have to start with the oldest and progress
to the newest. It would try to change tables that had not yet been created
causing major problems to the node module. (NOTE: if you are doing a x.xx
update to another x.xx version you might have to force MySQL to perform it
using the -f flag. Remember to always backup your data before making
changes).
- Prevented 2.00-to-x.xx.php from executing. It would simply give a PHP error
and not execute. Will wait for Dries to return before attempting to make it
functional or remove it.
-rw-r--r-- | updates/2.00-to-x.xx.php | 1 | ||||
-rw-r--r-- | updates/2.00-to-x.xx.sql | 147 |
2 files changed, 74 insertions, 74 deletions
diff --git a/updates/2.00-to-x.xx.php b/updates/2.00-to-x.xx.php index da2e3928b..aedfa2aab 100644 --- a/updates/2.00-to-x.xx.php +++ b/updates/2.00-to-x.xx.php @@ -1,4 +1,5 @@ <?php +die("For now you will have to do the updates from the command line.") include "includes/common.inc"; diff --git a/updates/2.00-to-x.xx.sql b/updates/2.00-to-x.xx.sql index 18e409eb9..2ac5ef3ae 100644 --- a/updates/2.00-to-x.xx.sql +++ b/updates/2.00-to-x.xx.sql @@ -1,42 +1,51 @@ -# 19/04/2001: -ALTER TABLE node ADD comment int(2) DEFAULT '1' NOT NULL; -ALTER TABLE node ADD promote int(2) DEFAULT '1' NOT NULL; -ALTER TABLE category ADD promote int(2) unsigned DEFAULT '0' NOT NULL; +# 01/04/2001: +CREATE TABLE access ( + id tinyint(10) DEFAULT '0' NOT NULL auto_increment, + mask varchar(255) DEFAULT '' NOT NULL, + reason text NOT NULL, + UNIQUE mask (mask), + PRIMARY KEY (id) +); -CREATE TABLE cvs ( - user varchar(32) DEFAULT '' NOT NULL, - files text, - status int(2) DEFAULT '0' NOT NULL, - message text, - timestamp int(11) DEFAULT '0' NOT NULL +CREATE TABLE book ( + lid int(10) unsigned DEFAULT '0' NOT NULL auto_increment, + nid int(10) unsigned DEFAULT '0' NOT NULL, + body text NOT NULL, + section int(10) DEFAULT '0' NOT NULL, + parent int(10) DEFAULT '0' NOT NULL, + weight tinyint(3) DEFAULT '0' NOT NULL, + PRIMARY KEY (lid) ); -# 14/04/2001: -ALTER TABLE node ADD cid int(10) unsigned DEFAULT '0' NOT NULL; -ALTER TABLE node ADD tid int(10) unsigned DEFAULT '0' NOT NULL; -ALTER TABLE story DROP section; -ALTER TABLE comments ADD KEY(lid); +CREATE TABLE story ( + lid int(10) unsigned DEFAULT '0' NOT NULL auto_increment, + nid int(10) unsigned DEFAULT '0' NOT NULL, + abstract text NOT NULL, + body text NOT NULL, + section varchar(64) DEFAULT '' NOT NULL, + PRIMARY KEY (lid) +); -CREATE TABLE category ( - cid int(10) unsigned DEFAULT '0' NOT NULL auto_increment, - name varchar(32) DEFAULT '' NOT NULL, +CREATE TABLE node ( + nid int(10) unsigned DEFAULT '0' NOT NULL auto_increment, + lid int(10) DEFAULT '0' NOT NULL, + pid int(10) DEFAULT '0' NOT NULL, + log text NOT NULL, type varchar(16) DEFAULT '' NOT NULL, - post int(3) DEFAULT '0' NOT NULL, - dump int(3) DEFAULT '0' NOT NULL, - expire int(3) DEFAULT '0' NOT NULL, - comment int(2) unsigned DEFAULT '0' NOT NULL, - submission int(2) unsigned DEFAULT '0' NOT NULL, - UNIQUE (name), - PRIMARY KEY (cid) + title varchar(128) DEFAULT '' NOT NULL, + score int(11) DEFAULT '0' NOT NULL, + votes int(11) DEFAULT '0' NOT NULL, + author int(6) DEFAULT '0' NOT NULL, + status int(4) DEFAULT '1' NOT NULL, + timestamp int(11) NOT NULL, + KEY type (lid, type), + KEY author (author), + KEY title (title, type), + PRIMARY KEY (nid) ); -CREATE TABLE topic ( - tid int(10) unsigned DEFAULT '0' NOT NULL auto_increment, - pid int(10) unsigned DEFAULT '0' NOT NULL, - name varchar(32) DEFAULT '' NOT NULL, - UNIQUE (name), - PRIMARY KEY (tid) -); +alter table users change stories nodes tinyint(2) DEFAULT '10'; +alter table comments drop link; # 07/04/2001: CREATE TABLE page ( @@ -74,52 +83,42 @@ CREATE TABLE watchdog ( ALTER TABLE users CHANGE rating rating decimal(8,2); -# 01/04/2001: +# 14/04/2001: +ALTER TABLE node ADD cid int(10) unsigned DEFAULT '0' NOT NULL; +ALTER TABLE node ADD tid int(10) unsigned DEFAULT '0' NOT NULL; +ALTER TABLE story DROP section; +ALTER TABLE comments ADD KEY(lid); -CREATE TABLE access ( - id tinyint(10) DEFAULT '0' NOT NULL auto_increment, - mask varchar(255) DEFAULT '' NOT NULL, - reason text NOT NULL, - UNIQUE mask (mask), - PRIMARY KEY (id) +CREATE TABLE category ( + cid int(10) unsigned DEFAULT '0' NOT NULL auto_increment, + name varchar(32) DEFAULT '' NOT NULL, + type varchar(16) DEFAULT '' NOT NULL, + post int(3) DEFAULT '0' NOT NULL, + dump int(3) DEFAULT '0' NOT NULL, + expire int(3) DEFAULT '0' NOT NULL, + comment int(2) unsigned DEFAULT '0' NOT NULL, + submission int(2) unsigned DEFAULT '0' NOT NULL, + UNIQUE (name), + PRIMARY KEY (cid) ); -CREATE TABLE book ( - lid int(10) unsigned DEFAULT '0' NOT NULL auto_increment, - nid int(10) unsigned DEFAULT '0' NOT NULL, - body text NOT NULL, - section int(10) DEFAULT '0' NOT NULL, - parent int(10) DEFAULT '0' NOT NULL, - weight tinyint(3) DEFAULT '0' NOT NULL, - PRIMARY KEY (lid) +CREATE TABLE topic ( + tid int(10) unsigned DEFAULT '0' NOT NULL auto_increment, + pid int(10) unsigned DEFAULT '0' NOT NULL, + name varchar(32) DEFAULT '' NOT NULL, + UNIQUE (name), + PRIMARY KEY (tid) ); -CREATE TABLE story ( - lid int(10) unsigned DEFAULT '0' NOT NULL auto_increment, - nid int(10) unsigned DEFAULT '0' NOT NULL, - abstract text NOT NULL, - body text NOT NULL, - section varchar(64) DEFAULT '' NOT NULL, - PRIMARY KEY (lid) -); +# 19/04/2001: +ALTER TABLE node ADD comment int(2) DEFAULT '1' NOT NULL; +ALTER TABLE node ADD promote int(2) DEFAULT '1' NOT NULL; +ALTER TABLE category ADD promote int(2) unsigned DEFAULT '0' NOT NULL; -CREATE TABLE node ( - nid int(10) unsigned DEFAULT '0' NOT NULL auto_increment, - lid int(10) DEFAULT '0' NOT NULL, - pid int(10) DEFAULT '0' NOT NULL, - log text NOT NULL, - type varchar(16) DEFAULT '' NOT NULL, - title varchar(128) DEFAULT '' NOT NULL, - score int(11) DEFAULT '0' NOT NULL, - votes int(11) DEFAULT '0' NOT NULL, - author int(6) DEFAULT '0' NOT NULL, - status int(4) DEFAULT '1' NOT NULL, - timestamp int(11) NOT NULL, - KEY type (lid, type), - KEY author (author), - KEY title (title, type), - PRIMARY KEY (nid) +CREATE TABLE cvs ( + user varchar(32) DEFAULT '' NOT NULL, + files text, + status int(2) DEFAULT '0' NOT NULL, + message text, + timestamp int(11) DEFAULT '0' NOT NULL ); - -alter table users change stories nodes tinyint(2) DEFAULT '10'; -alter table comments drop link; |