From be2b7c0b5f7f9b8080affbb4bc44c5adda18e82f Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 29 Feb 2016 19:31:52 -0800 Subject: abconfig --- install/schema_mysql.sql | 14 ++++++++++++++ install/schema_postgres.sql | 13 +++++++++++++ install/update.php | 43 +++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 68 insertions(+), 2 deletions(-) (limited to 'install') diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql index 07a88cf0a..01cf97674 100644 --- a/install/schema_mysql.sql +++ b/install/schema_mysql.sql @@ -1,4 +1,18 @@ +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; + CREATE TABLE IF NOT EXISTS `abook` ( `abook_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `abook_account` int(10) unsigned NOT NULL DEFAULT '0', diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql index 3302ef6c0..0ff78e873 100644 --- a/install/schema_postgres.sql +++ b/install/schema_postgres.sql @@ -1,3 +1,16 @@ +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") +); +create index "abconfig_chan" on abconfig ("chan"); +create index "abconfig_xchan" on abconfig ("xchan"); +create index "abconfig_cat" on abconfig ("cat"); +create index "abconfig_k" on abconfig ("k"); CREATE TABLE "abook" ( "abook_id" serial NOT NULL, "abook_account" bigint NOT NULL, 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 @@ Date: Tue, 1 Mar 2016 17:54:52 +0100 Subject: fix typo in postgres schema --- install/schema_postgres.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'install') diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql index 0ff78e873..a7cd5875c 100644 --- a/install/schema_postgres.sql +++ b/install/schema_postgres.sql @@ -560,7 +560,7 @@ CREATE TABLE "iconfig" ( "k" text NOT NULL DEFAULT '', "v" text NOT NULL DEFAULT '', "sharing" int NOT NULL DEFAULT '0', - PRIMARY_KEY("id") + PRIMARY KEY("id") ); create index "iconfig_iid" on iconfig ("iid"); create index "iconfig_cat" on iconfig ("cat"); -- cgit v1.2.3