From a28f8180065e5622c4b4ef11b0276835dd4a9af1 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 26 Aug 2002 18:18:12 +0000 Subject: [PATCH] - Changed "$watchdog->message" from type "varchar(255)" to type "text". Patch by James. For sake of consistency, I updated the MySQL scheme and added a new update entry to "update.php". --- database/database.mysql | 2 +- database/database.pgsql | 4 ++-- update.php | 9 +++++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/database/database.mysql b/database/database.mysql index a9b06902384..5dc61d7465a 100644 --- a/database/database.mysql +++ b/database/database.mysql @@ -507,7 +507,7 @@ CREATE TABLE watchdog ( wid int(5) NOT NULL auto_increment, uid int(10) NOT NULL default '0', type varchar(16) NOT NULL default '', - message varchar(255) NOT NULL default '', + message text NOT NULL default '', location varchar(128) NOT NULL default '', hostname varchar(128) NOT NULL default '', timestamp int(11) NOT NULL default '0', diff --git a/database/database.pgsql b/database/database.pgsql index eed26335844..7f3c28ea524 100644 --- a/database/database.pgsql +++ b/database/database.pgsql @@ -237,7 +237,7 @@ CREATE TABLE node ( comment integer NOT NULL default '0', promote integer NOT NULL default '0', moderate integer NOT NULL default '0', - users text NOT NULL, + users text NOT NULL default '', attributes varchar(255) NOT NULL default '', teaser text NOT NULL, body text NOT NULL, @@ -509,7 +509,7 @@ CREATE TABLE watchdog ( wid SERIAL, uid integer NOT NULL default '0', type varchar(16) NOT NULL default '', - message varchar(255) NOT NULL default '', + message text NOT NULL default '', location varchar(128) NOT NULL default '', hostname varchar(128) NOT NULL default '', timestamp integer NOT NULL default '0', diff --git a/update.php b/update.php index 9c74537d3d5..b97811d5543 100644 --- a/update.php +++ b/update.php @@ -49,7 +49,8 @@ $mysql_updates = array( "2002-07-31" => "update_34", "2002-08-10" => "update_35", "2002-08-16" => "update_36", - "2002-08-19" => "update_37" + "2002-08-19" => "update_37", + "2002-08-26" => "update_38" ); // Update functions @@ -514,7 +515,7 @@ function update_37() { update_sql("DROP TABLE IF EXISTS sequences;"); update_sql("CREATE TABLE sequences ( - name VARCHAR(255) NOT NULL PRIMARY KEY, + name VARCHAR(255) NOT NULL PRIMARY KEY, id INT UNSIGNED NOT NULL ) TYPE=MyISAM;"); @@ -532,6 +533,10 @@ function update_37() { } } +function update_38() { + update_sql("ALTER TABLE watchdog CHANGE message message text NOT NULL default '';"); +} + function update_upgrade3() { update_sql("INSERT INTO system VALUES ('archive.module','archive','module','',1);"); update_sql("INSERT INTO system VALUES ('block.module','block','module','',1);");