diff options
author | friendica <info@friendica.com> | 2012-02-10 13:43:35 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-02-10 13:43:35 -0800 |
commit | d79c3351ea6692478a490f4225ea1009863dd65f (patch) | |
tree | 4cc9d5470c70913c0317e49b21601fd80fe7e781 /update.php | |
parent | b346f4464c230af4636c61397decd03eadb18e9a (diff) | |
download | volse-hubzilla-d79c3351ea6692478a490f4225ea1009863dd65f.tar.gz volse-hubzilla-d79c3351ea6692478a490f4225ea1009863dd65f.tar.bz2 volse-hubzilla-d79c3351ea6692478a490f4225ea1009863dd65f.zip |
db installation sync
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`) "); + +} |