diff options
author | git-marijus <mario@mariovavti.com> | 2017-07-31 16:49:56 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-07-31 17:30:06 +0200 |
commit | d33974cec44d7ed7a648a4e30380c3dfa3f11b2f (patch) | |
tree | 22434a73a44194dd8792e1d9a35c66f58f4a615f /install/update.php | |
parent | a3fef34a3f542905247031d0dfd7ec661fbefd1c (diff) | |
download | volse-hubzilla-d33974cec44d7ed7a648a4e30380c3dfa3f11b2f.tar.gz volse-hubzilla-d33974cec44d7ed7a648a4e30380c3dfa3f11b2f.tar.bz2 volse-hubzilla-d33974cec44d7ed7a648a4e30380c3dfa3f11b2f.zip |
db update to add index for item.obj_type
Diffstat (limited to 'install/update.php')
-rw-r--r-- | install/update.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/install/update.php b/install/update.php index ac560f4db..8798a3d69 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1192 ); +define( 'UPDATE_VERSION' , 1193 ); /** * @@ -2963,6 +2963,18 @@ function update_r1191() { return UPDATE_FAILED; } } +} +function update_r1192() { + if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { + $r1 = q("CREATE INDEX item_obj_type ON item (obj_type)"); + } + else { + $r1 = q("ALTER TABLE item ADD INDEX (obj_type)"); + } + + if($r1) + return UPDATE_SUCCESS; + return UPDATE_FAILED; } |