diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-09-16 10:11:59 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-09-16 10:11:59 +0200 |
commit | d5ffa5508d4c04be801d049b63ae6881460abe82 (patch) | |
tree | 4e52797a39add8e7662d06028c0b25584c432561 /install/update.php | |
parent | cb3fb0049f64a92668bc94746dc55cc905683699 (diff) | |
download | volse-hubzilla-d5ffa5508d4c04be801d049b63ae6881460abe82.tar.gz volse-hubzilla-d5ffa5508d4c04be801d049b63ae6881460abe82.tar.bz2 volse-hubzilla-d5ffa5508d4c04be801d049b63ae6881460abe82.zip |
db update to add index to item.resource_id we query this in wikis a lot
Diffstat (limited to 'install/update.php')
-rw-r--r-- | install/update.php | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/install/update.php b/install/update.php index 8c9f83033..07675a973 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1195 ); +define( 'UPDATE_VERSION' , 1196 ); /** * @@ -3007,4 +3007,18 @@ function update_r1194() { } return UPDATE_SUCCESS; -}
\ No newline at end of file +} + +function update_r1195() { + + if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { + $r1 = q("CREATE INDEX item_resource_id ON item (resource_id)"); + } + else { + $r1 = q("ALTER TABLE item ADD INDEX (resource_id)"); + } + + if($r1) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} |