aboutsummaryrefslogtreecommitdiffstats
path: root/update.php
diff options
context:
space:
mode:
Diffstat (limited to 'update.php')
-rwxr-xr-xupdate.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/update.php b/update.php
index dc3cc0e56..9e3f22ef1 100755
--- a/update.php
+++ b/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1120 );
+define( 'UPDATE_VERSION' , 1121 );
/**
*
@@ -1021,3 +1021,19 @@ q("ALTER TABLE `contact` ADD `closeness` TINYINT( 2 ) NOT NULL DEFAULT '99' AFTE
q("update contact set closeness = 0 where self = 1");
q("ALTER TABLE `item` ADD `spam` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `visible` , ADD INDEX (`spam`) ");
}
+
+
+function update_1120() {
+
+ // item table update from 1119 did not get into database.sql file.
+ // might be missing on new installs. We'll check.
+
+ $r = q("describe item");
+ if($r && count($r)) {
+ foreach($r as $rr)
+ if($rr['Field'] == 'spam')
+ return;
+ }
+ q("ALTER TABLE `item` ADD `spam` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `visible` , ADD INDEX (`spam`) ");
+
+}