diff options
author | redmatrix <git@macgirvin.com> | 2016-02-18 00:20:08 -0800 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-02-18 00:20:08 -0800 |
commit | 76bf892f9f52c0deee313a89929185e332877f85 (patch) | |
tree | 73708b0268833e5cad6c92347f433727e9416fc8 /install/update.php | |
parent | 879bc7192713b1411865058fad69b9ff5fdf860a (diff) | |
download | volse-hubzilla-76bf892f9f52c0deee313a89929185e332877f85.tar.gz volse-hubzilla-76bf892f9f52c0deee313a89929185e332877f85.tar.bz2 volse-hubzilla-76bf892f9f52c0deee313a89929185e332877f85.zip |
iconfig - add sharing variable
Diffstat (limited to 'install/update.php')
-rw-r--r-- | install/update.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/install/update.php b/install/update.php index e96bda03c..d21295be7 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1162 ); +define( 'UPDATE_VERSION' , 1163 ); /** * @@ -1971,7 +1971,6 @@ function update_r1161() { $r2 = q("create index \"iconfig_iid\" on iconfig (\"iid\") ");; $r3 = q("create index \"iconfig_cat\" on iconfig (\"cat\") "); $r4 = q("create index \"iconfig_k\" on iconfig (\"k\") "); - $r = $r1 && $r2 && $r3 && $r4; } else { @@ -1994,3 +1993,14 @@ $r4 = q("create index \"iconfig_k\" on iconfig (\"k\") "); return UPDATE_FAILED; } +function update_r1162() { + $r1 = q("alter table iconfig add sharing int not null default '0' "); + + if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) + $r2 = q("create index \"iconfig_sharing\" on iconfig (\"sharing\") "); + else + $r2 = q("alter table iconfig add index ( sharing ) "); + if($r1 && $r2) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +}
\ No newline at end of file |