diff options
author | Michael <icarus@dabo.de> | 2012-02-19 20:09:42 +0100 |
---|---|---|
committer | Michael <icarus@dabo.de> | 2012-02-19 20:09:42 +0100 |
commit | cafd4003522a472d2709569ea5eb5f80b817af23 (patch) | |
tree | bbd512126515afc929de06dce79ba847b9681092 /update.php | |
parent | 73e0e4d78341cb96ef9665a0ee4fb7e7ee2a701f (diff) | |
parent | a9ed5915cebcf51347acaad51d0c252e57bceaff (diff) | |
download | volse-hubzilla-cafd4003522a472d2709569ea5eb5f80b817af23.tar.gz volse-hubzilla-cafd4003522a472d2709569ea5eb5f80b817af23.tar.bz2 volse-hubzilla-cafd4003522a472d2709569ea5eb5f80b817af23.zip |
Merge remote branch 'upstream/master'
Conflicts:
view/theme/vier/style.css
Diffstat (limited to 'update.php')
-rwxr-xr-x | update.php | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/update.php b/update.php index d961f2932..24138450a 100755 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1118 ); +define( 'UPDATE_VERSION' , 1122 ); /** * @@ -1012,3 +1012,56 @@ INDEX ( `mid` ) } +function update_1118() { + // rolled forward +} + +function update_1119() { +q("ALTER TABLE `contact` ADD `closeness` TINYINT( 2 ) NOT NULL DEFAULT '99' AFTER `reason` , ADD INDEX (`closeness`) "); +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`) "); + +} + +function update_1121() { + q("CREATE TABLE IF NOT EXISTS `poll_result` ( + `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , + `poll_id` INT NOT NULL , + `choice` INT NOT NULL , + INDEX ( `poll_id` ), + INDEX ( `choice` ) + ) ENGINE = MYISAM "); + + q("CREATE TABLE IF NOT EXISTS `poll` ( + `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , + `uid` INT NOT NULL , + `q0` MEDIUMTEXT NOT NULL , + `q1` MEDIUMTEXT NOT NULL , + `q2` MEDIUMTEXT NOT NULL , + `q3` MEDIUMTEXT NOT NULL , + `q4` MEDIUMTEXT NOT NULL , + `q5` MEDIUMTEXT NOT NULL , + `q6` MEDIUMTEXT NOT NULL , + `q7` MEDIUMTEXT NOT NULL , + `q8` MEDIUMTEXT NOT NULL , + `q9` MEDIUMTEXT NOT NULL , + INDEX ( `uid` ) + ) ENGINE = MYISAM "); + +} + |