From 9d51318c53e1adc2e4d4c8586f8783819516991e Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 19 Oct 2017 17:24:11 -0700 Subject: table structure for pseudo or proxy channels (pchan) --- install/schema_mysql.sql | 13 +++++++++++++ install/schema_postgres.sql | 13 +++++++++++++ install/update.php | 40 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 65 insertions(+), 1 deletion(-) (limited to 'install') diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql index 3143854f5..afa3c095d 100644 --- a/install/schema_mysql.sql +++ b/install/schema_mysql.sql @@ -900,6 +900,19 @@ CREATE TABLE IF NOT EXISTS `outq` ( KEY `outq_priority` (`outq_priority`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS pchan ( + `pchan_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `pchan_guid` char(191) NOT NULL DEFAULT '', + `pchan_hash` char(191) NOT NULL DEFAULT '', + `pchan_pubkey` text NOT NULL, + `pchan_prvkey` text NOT NULL, + PRIMARY KEY (`pchan_id`), + KEY `pchan_guid` (`pchan_guid`), + KEY `pchan_hash` (`pchan_hash`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + CREATE TABLE IF NOT EXISTS `pconfig` ( `id` int(11) NOT NULL AUTO_INCREMENT, `uid` int(11) NOT NULL DEFAULT 0 , diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql index 65acb644b..082817a60 100644 --- a/install/schema_postgres.sql +++ b/install/schema_postgres.sql @@ -872,6 +872,19 @@ create index "outq_async" on outq ("outq_async"); create index "outq_delivered" on outq ("outq_delivered"); create index "outq_priority" on outq ("outq_priority"); + +CREATE TABLE "pchan" ( + "pchan_id" serial NOT NULL, + "pchan_guid" text NOT NULL, + "pchan_hash" text NOT NULL, + "pchan_pubkey" text NOT NULL, + "pchan_prvkey" text NOT NULL, + PRIMARY KEY ("pchan_id") +); + +create index "pchan_guid" on pchan ("pchan_guid"); +create index "pchan_hash" on pchan ("pchan_hash"); + CREATE TABLE "pconfig" ( "id" serial NOT NULL, "uid" bigint NOT NULL DEFAULT '0', diff --git a/install/update.php b/install/update.php index 07675a973..80d987a19 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ Date: Thu, 19 Oct 2017 18:48:01 -0700 Subject: typo --- install/update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'install') diff --git a/install/update.php b/install/update.php index 80d987a19..7d59555d3 100644 --- a/install/update.php +++ b/install/update.php @@ -3036,7 +3036,7 @@ function update_r1196() { )"); $r2 = q("create index \"pchan_guid\" on pchan (\"pchan_guid\")"); - $r3 = q("create index \"pchan_hash\" on pchan (\"pchan_hash\"); + $r3 = q("create index \"pchan_hash\" on pchan (\"pchan_hash\")"); if($r1 && $r2 && $r3) { return UPDATE_SUCCESS; -- cgit v1.2.3