db installation sync

This commit is contained in:
friendica 2012-02-10 13:43:35 -08:00
parent b346f4464c
commit d79c3351ea
4 changed files with 22 additions and 3 deletions

View file

@ -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`) ");
}