aboutsummaryrefslogtreecommitdiffstats
path: root/install/update.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-02-29 19:31:52 -0800
committerredmatrix <git@macgirvin.com>2016-02-29 19:31:52 -0800
commitbe2b7c0b5f7f9b8080affbb4bc44c5adda18e82f (patch)
tree6dde06168b0df62044a3fdeaf2b4b9b649165d7a /install/update.php
parent44b2503572700ab24e7afad4637f62c413d3d489 (diff)
downloadvolse-hubzilla-be2b7c0b5f7f9b8080affbb4bc44c5adda18e82f.tar.gz
volse-hubzilla-be2b7c0b5f7f9b8080affbb4bc44c5adda18e82f.tar.bz2
volse-hubzilla-be2b7c0b5f7f9b8080affbb4bc44c5adda18e82f.zip
abconfig
Diffstat (limited to 'install/update.php')
-rw-r--r--install/update.php43
1 files changed, 41 insertions, 2 deletions
diff --git a/install/update.php b/install/update.php
index 0f9b3ab28..bfd01494f 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1164 );
+define( 'UPDATE_VERSION' , 1165 );
/**
*
@@ -2018,4 +2018,43 @@ function update_r1163() {
if($r1 && $r2)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
-} \ No newline at end of file
+}
+
+function update_r1164() {
+
+ if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
+ $r1 = q("CREATE TABLE \"abconfig\" (
+ \"id\" serial NOT NULL,
+ \"chan\" text NOT NULL,
+ \"xchan\" text NOT NULL,
+ \"cat\" text NOT NULL,
+ \"k\" text NOT NULL,
+ \"v\" text NOT NULL,
+ PRIMARY KEY (\"id\") ");
+ $r2 = q("create index \"abconfig_chan\" on abconfig (\"chan\") ");
+ $r3 = q("create index \"abconfig_xchan\" on abconfig (\"xchan\") ");
+ $r4 = q("create index \"abconfig_cat\" on abconfig (\"cat\") ");
+ $r5 = q("create index \"abconfig_k\" on abconfig (\"k\") ");
+ $r = $r1 && $r2 && $r3 && $r4 && $r5;
+ }
+ else {
+ $r = q("CREATE TABLE IF NOT EXISTS `abconfig` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `chan` char(255) NOT NULL DEFAULT '',
+ `xchan` char(255) NOT NULL DEFAULT '',
+ `cat` char(255) NOT NULL DEFAULT '',
+ `k` char(255) NOT NULL DEFAULT '',
+ `v` mediumtext NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `chan` (`chan`),
+ KEY `xchan` (`xchan`),
+ KEY `cat` (`cat`),
+ KEY `k` (`k`)
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ");
+
+ }
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+