diff options
Diffstat (limited to 'install/update.php')
-rw-r--r-- | install/update.php | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/install/update.php b/install/update.php index d6953cdbc..381ea0828 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1131 ); +define( 'UPDATE_VERSION' , 1133 ); /** * @@ -1483,4 +1483,27 @@ function update_r1130() { ); return UPDATE_SUCCESS; +} + +function update_r1131() { + if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) // make sure this gets skipped for anyone who hasn't run it yet, it will fail on pg + return UPDATE_SUCCESS; + + $r1 = q("ALTER TABLE `abook` ADD `abook_rating_text` TEXT NOT NULL DEFAULT '' AFTER `abook_rating` "); + $r2 = q("ALTER TABLE `xlink` ADD `xlink_rating_text` TEXT NOT NULL DEFAULT '' AFTER `xlink_rating` "); + + if($r1 && $r2) + return UPDATE_SUCCESS; + return UPDATE_FAILED; + +} + +function update_r1132() { + if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { // correct previous failed update + $r1 = q("ALTER TABLE abook ADD abook_rating_text TEXT NOT NULL DEFAULT '' "); + $r2 = q("ALTER TABLE xlink ADD xlink_rating_text TEXT NOT NULL DEFAULT '' "); + if(!$r1 || !$r2) + return UPDATE_FAILED; + } + return UPDATE_SUCCESS; }
\ No newline at end of file |