diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2012-02-13 09:46:42 +0100 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2012-02-13 09:46:42 +0100 |
commit | 850560519a4bbe9949368933e115f767aeb90b73 (patch) | |
tree | 6f162b4b0130a5f829d40f7ebd9d18442ad18921 /update.php | |
parent | 16d3bc9deb5cb80f438a53f1bf483c79351674af (diff) | |
parent | 85c831bcbf6f4cc2793d91e4e3fb3da5828a3f60 (diff) | |
download | volse-hubzilla-850560519a4bbe9949368933e115f767aeb90b73.tar.gz volse-hubzilla-850560519a4bbe9949368933e115f767aeb90b73.tar.bz2 volse-hubzilla-850560519a4bbe9949368933e115f767aeb90b73.zip |
Merge remote-tracking branch 'friendica/master' into mobile
Diffstat (limited to 'update.php')
-rwxr-xr-x | update.php | 18 |
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`) "); + +} |