Skip to content
Browse files

Whoops, left attachment field out of the database schema (affected

new installations of 1.0.2 and later)
  • Loading branch information...
1 parent 45c58cb commit 99b5e56207f890c84cef2595470c997ad500e14f martin committed Sep 10, 2002
Showing with 8 additions and 1 deletion.
  1. +1 −0 mod/forum/db/mysql.sql
  2. +7 −1 mod/forum/version.php
View
1 mod/forum/db/mysql.sql
@@ -47,6 +47,7 @@ CREATE TABLE forum_posts (
mailed tinyint(1) unsigned NOT NULL default '0',
subject varchar(255) NOT NULL default '',
message text NOT NULL,
+ attachment VARCHAR(100) NOT NULL default '',
totalscore tinyint(4) NOT NULL default '0',
PRIMARY KEY (id)
) COMMENT='All posts are stored in this table';
View
8 mod/forum/version.php
@@ -5,7 +5,7 @@
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2002082900;
+$module->version = 2002091000;
$module->cron = 60;
function forum_upgrade($oldversion) {
@@ -43,6 +43,12 @@ function forum_upgrade($oldversion) {
execute_sql(" ALTER TABLE `forum_posts` ADD `attachment` VARCHAR(100) NOT NULL AFTER `message` ");
}
+ if ($oldversion < 2002091000) {
+ if (! execute_sql(" ALTER TABLE `forum_posts` ADD `attachment` VARCHAR(100) NOT NULL AFTER `message` ")) {
+ echo "<P>Don't worry about this error - your server already had this upgrade applied";
+ }
+ }
+
return true;
}

0 comments on commit 99b5e56

Please sign in to comment.
Something went wrong with that request. Please try again.