diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-02-21 19:01:04 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-02-21 19:01:04 +0000 |
commit | 9d3d374bc885b8771a013352b8e2c6b7625324d8 (patch) | |
tree | ae441fee7e34f19d8752e2eec756b7a048176cbd | |
parent | 32e46a375dcd93dbd8190812bf508bb0881b1919 (diff) | |
download | brdo-9d3d374bc885b8771a013352b8e2c6b7625324d8.tar.gz brdo-9d3d374bc885b8771a013352b8e2c6b7625324d8.tar.bz2 |
- Patch by Killes: drop the 'attributes' field from the 'users' table. It
is no longer used.
-rw-r--r-- | database/database.mssql | 1 | ||||
-rw-r--r-- | database/database.mysql | 1 | ||||
-rw-r--r-- | database/database.pgsql | 1 | ||||
-rw-r--r-- | update.php | 16 |
4 files changed, 13 insertions, 6 deletions
diff --git a/database/database.mssql b/database/database.mssql index 77a022002..a9b313449 100644 --- a/database/database.mssql +++ b/database/database.mssql @@ -202,7 +202,6 @@ CREATE TABLE [dbo].[node] ( [promote] [int] NOT NULL , [moderate] [int] NOT NULL , [users] [text] NULL , - [attributes] [varchar] (255) NULL , [teaser] [text] NOT NULL , [body] [text] NOT NULL , [changed] [int] NOT NULL , diff --git a/database/database.mysql b/database/database.mysql index bcc69cadd..b340c5d12 100644 --- a/database/database.mysql +++ b/database/database.mysql @@ -288,7 +288,6 @@ CREATE TABLE node ( promote int(2) NOT NULL default '0', moderate int(2) NOT NULL default '0', users longtext NOT NULL, - attributes varchar(255) NOT NULL default '', teaser longtext NOT NULL, body longtext NOT NULL, changed int(11) NOT NULL default '0', diff --git a/database/database.pgsql b/database/database.pgsql index 636f51e6d..030d3b226 100644 --- a/database/database.pgsql +++ b/database/database.pgsql @@ -277,7 +277,6 @@ CREATE TABLE node ( promote integer NOT NULL default '0', moderate integer NOT NULL default '0', users text NOT NULL default '', - attributes varchar(255) NOT NULL default '', teaser text NOT NULL default '', body text NOT NULL default '', changed integer NOT NULL default '0', diff --git a/update.php b/update.php index 5fe282c24..9d02d4c8d 100644 --- a/update.php +++ b/update.php @@ -67,7 +67,8 @@ $mysql_updates = array( "2004-01-06" => "update_75", "2004-01-11" => "update_76", "2004-01-13" => "update_77", - "2004-02-03" => "update_78" + "2004-02-03" => "update_78", + "2004-02-21" => "update_79" ); function update_32() { @@ -517,7 +518,7 @@ function update_67() { // Taking no action. PostgreSQL is not always capable of dropping columns. } else { - update_sql("ALTER TABLE users DROP homepage"); + update_sql("ALTER TABLE {users} DROP homepage"); } } @@ -528,7 +529,7 @@ function update_68() { else { $max = db_result(db_query("SELECT MAX(aid) FROM {access};")); update_sql("INSERT INTO {sequences} (name, id) VALUES ('access_aid', '$max')"); - update_sql("ALTER TABLE access CHANGE aid aid tinyint(10) NOT NULL "); + update_sql("ALTER TABLE {access} CHANGE aid aid tinyint(10) NOT NULL "); } } @@ -671,6 +672,15 @@ function update_78() { } } +function update_79() { + if ($GLOBALS["db_type"] == "pgsql") { + // Taking no action. PostgreSQL is not always capable of dropping columns. + } + else { + update_sql("ALTER TABLE {node} DROP attributes"); + } +} + /* ** System functions */ |