aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Update/_1164.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Update/_1164.php')
-rw-r--r--Zotlabs/Update/_1164.php45
1 files changed, 45 insertions, 0 deletions
diff --git a/Zotlabs/Update/_1164.php b/Zotlabs/Update/_1164.php
new file mode 100644
index 000000000..bad9193d1
--- /dev/null
+++ b/Zotlabs/Update/_1164.php
@@ -0,0 +1,45 @@
+<?php
+
+namespace Zotlabs\Update;
+
+class _1164 {
+function run() {
+
+ 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;
+}
+
+
+} \ No newline at end of file