aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authormjfriaza <mjfriaza@disroot.org>2022-05-17 13:44:06 +0200
committermjfriaza <mjfriaza@disroot.org>2022-05-17 13:44:06 +0200
commita75c61d71efebf43713026200aa0f513bd7eef09 (patch)
tree909048adeaa329813e2530d43626ed3bd711bc25 /install
parent481ecee9e87342ca7a1217395085e95d1a3b61ea (diff)
parent0d0f73fb67bbfcc53058cefded85ac36f951c7a7 (diff)
downloadvolse-hubzilla-a75c61d71efebf43713026200aa0f513bd7eef09.tar.gz
volse-hubzilla-a75c61d71efebf43713026200aa0f513bd7eef09.tar.bz2
volse-hubzilla-a75c61d71efebf43713026200aa0f513bd7eef09.zip
Merge remote-tracking branch 'upstream/dev' into dev
Diffstat (limited to 'install')
-rw-r--r--install/schema_mysql.sql65
-rw-r--r--install/schema_postgres.sql61
2 files changed, 9 insertions, 117 deletions
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql
index 17ad1767e..80ae20d7b 100644
--- a/install/schema_mysql.sql
+++ b/install/schema_mysql.sql
@@ -37,6 +37,7 @@ CREATE TABLE IF NOT EXISTS `abook` (
`abook_incl` text NOT NULL,
`abook_excl` text NOT NULL,
`abook_instance` text NOT NULL,
+ `abook_role` char(191) NOT NULL DEFAULT '',
PRIMARY KEY (`abook_id`),
KEY `abook_account` (`abook_account`),
KEY `abook_channel` (`abook_channel`),
@@ -58,7 +59,8 @@ CREATE TABLE IF NOT EXISTS `abook` (
KEY `abook_unconnected` (`abook_unconnected`),
KEY `abook_self` (`abook_self`),
KEY `abook_not_here` (`abook_not_here`),
- KEY `abook_feed` (`abook_feed`)
+ KEY `abook_feed` (`abook_feed`),
+ KEY `abook_role` (`abook_role`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `account` (
@@ -146,12 +148,14 @@ CREATE TABLE IF NOT EXISTS `app` (
CREATE TABLE IF NOT EXISTS `atoken` (
`atoken_id` int(11) NOT NULL AUTO_INCREMENT,
+ `atoken_guid` char(191) NOT NULL DEFAULT '',
`atoken_aid` int(11) NOT NULL DEFAULT 0 ,
`atoken_uid` int(11) NOT NULL DEFAULT 0 ,
`atoken_name` char(191) NOT NULL DEFAULT '',
`atoken_token` char(191) NOT NULL DEFAULT '',
`atoken_expires` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
PRIMARY KEY (`atoken_id`),
+ KEY `atoken_guid` (`atoken_guid`),
KEY `atoken_aid` (`atoken_aid`),
KEY `atoken_uid` (`atoken_uid`),
KEY `atoken_uid_2` (`atoken_uid`),
@@ -366,20 +370,6 @@ CREATE TABLE IF NOT EXISTS `config` (
UNIQUE KEY `access` (`cat`,`k`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-CREATE TABLE IF NOT EXISTS `conv` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `guid` char(191) NOT NULL DEFAULT '',
- `recips` mediumtext NOT NULL,
- `uid` int(11) NOT NULL DEFAULT 0 ,
- `creator` char(191) NOT NULL DEFAULT '',
- `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
- `updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
- `subject` mediumtext NOT NULL,
- PRIMARY KEY (`id`),
- KEY `created` (`created`),
- KEY `updated` (`updated`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-
CREATE TABLE IF NOT EXISTS `dreport` (
`dreport_id` int(11) NOT NULL AUTO_INCREMENT,
`dreport_channel` int(11) NOT NULL DEFAULT 0 ,
@@ -730,51 +720,6 @@ CREATE TABLE IF NOT EXISTS listeners (
KEY ltype (ltype)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-CREATE TABLE IF NOT EXISTS `mail` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `convid` int(10) unsigned NOT NULL DEFAULT 0 ,
- `conv_guid` char(191) NOT NULL DEFAULT '',
- `mail_flags` int(10) unsigned NOT NULL DEFAULT 0 ,
- `from_xchan` char(191) NOT NULL DEFAULT '',
- `to_xchan` char(191) NOT NULL DEFAULT '',
- `account_id` int(10) unsigned NOT NULL DEFAULT 0 ,
- `channel_id` int(10) unsigned NOT NULL DEFAULT 0 ,
- `mail_mimetype` char(64) NOT NULL DEFAULT 'text/bbcode',
- `title` text NOT NULL,
- `body` mediumtext NOT NULL,
- `sig` text NOT NULL,
- `attach` mediumtext NOT NULL,
- `mid` char(191) NOT NULL DEFAULT '',
- `parent_mid` char(191) NOT NULL DEFAULT '',
- `mail_deleted` tinyint(4) NOT NULL DEFAULT 0 ,
- `mail_replied` tinyint(4) NOT NULL DEFAULT 0 ,
- `mail_isreply` tinyint(4) NOT NULL DEFAULT 0 ,
- `mail_seen` tinyint(4) NOT NULL DEFAULT 0 ,
- `mail_recalled` tinyint(4) NOT NULL DEFAULT 0 ,
- `mail_obscured` smallint(6) NOT NULL DEFAULT 0 ,
- `mail_raw` tinyint(4) NOT NULL DEFAULT 0 ,
- `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
- `expires` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
- PRIMARY KEY (`id`),
- KEY `created` (`created`),
- KEY `mail_flags` (`mail_flags`),
- KEY `account_id` (`account_id`),
- KEY `channel_id` (`channel_id`),
- KEY `from_xchan` (`from_xchan`),
- KEY `to_xchan` (`to_xchan`),
- KEY `mid` (`mid`),
- KEY `parent_mid` (`parent_mid`),
- KEY `expires` (`expires`),
- KEY `convid` (`convid`),
- KEY `conv_guid` (`conv_guid`),
- KEY `mail_deleted` (`mail_deleted`),
- KEY `mail_replied` (`mail_replied`),
- KEY `mail_isreply` (`mail_isreply`),
- KEY `mail_seen` (`mail_seen`),
- KEY `mail_recalled` (`mail_recalled`),
- KEY `mail_obscured` (`mail_obscured`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-
CREATE TABLE IF NOT EXISTS `menu` (
`menu_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`menu_channel_id` int(10) unsigned NOT NULL DEFAULT 0 ,
diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql
index c18cc087b..96d0cc33c 100644
--- a/install/schema_postgres.sql
+++ b/install/schema_postgres.sql
@@ -37,6 +37,7 @@ CREATE TABLE "abook" (
"abook_incl" TEXT NOT NULL DEFAULT '',
"abook_excl" TEXT NOT NULL DEFAULT '',
"abook_instance" TEXT NOT NULL DEFAULT '',
+ "abook_role" varchar(64) NOT NULL DEFAULT '',
PRIMARY KEY ("abook_id")
);
create index "abook_account" on abook ("abook_account");
@@ -61,6 +62,7 @@ CREATE TABLE "abook" (
create index "abook_dob" on abook ("abook_dob");
create index "abook_connected" on abook ("abook_connected");
create index "abook_channel_closeness" on abook ("abook_channel", "abook_closeness");
+ create index "abook_role" on abook ("abook_role");
CREATE TABLE "account" (
"account_id" serial NOT NULL,
@@ -145,12 +147,14 @@ create index "app_system" on app ("app_system");
CREATE TABLE "atoken" (
"atoken_id" serial NOT NULL,
+ "atoken_guid" varchar(255) NOT NULL DEFAULT '',
"atoken_aid" bigint NOT NULL DEFAULT 0,
"atoken_uid" bigint NOT NULL DEFAULT 0,
"atoken_name" varchar(255) NOT NULL DEFAULT '',
"atoken_token" varchar(255) NOT NULL DEFAULT '',
"atoken_expires" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
PRIMARY KEY ("atoken_id"));
+create index atoken_guid on atoken (atoken_guid);
create index atoken_aid on atoken (atoken_aid);
create index atoken_uid on atoken (atoken_uid);
create index atoken_name on atoken (atoken_name);
@@ -356,19 +360,6 @@ CREATE TABLE "config" (
PRIMARY KEY ("id"),
UNIQUE ("cat","k")
);
-CREATE TABLE "conv" (
- "id" serial NOT NULL,
- "guid" text NOT NULL,
- "recips" text NOT NULL,
- "uid" bigint NOT NULL,
- "creator" text NOT NULL,
- "created" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
- "updated" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
- "subject" text NOT NULL,
- PRIMARY KEY ("id")
-);
-create index "conv_created_idx" on conv ("created");
-create index "conv_updated_idx" on conv ("updated");
CREATE TABLE IF NOT EXISTS "dreport" (
"dreport_id" serial NOT NULL,
@@ -729,50 +720,6 @@ create index "target_id_idx" on listeners ("target_id");
create index "portable_id_idx" on listeners ("portable_id");
create index "ltype_idx" on listeners ("ltype");
-CREATE TABLE "mail" (
- "id" serial NOT NULL,
- "convid" bigint NOT NULL DEFAULT '0',
- "conv_guid" text NOT NULL,
- "mail_flags" bigint NOT NULL DEFAULT '0',
- "from_xchan" text NOT NULL DEFAULT '',
- "to_xchan" text NOT NULL DEFAULT '',
- "account_id" bigint NOT NULL DEFAULT '0',
- "channel_id" bigint NOT NULL DEFAULT '0',
- "mail_mimetype" varchar(64) NOT NULL DEFAULT '0',
- "title" text NOT NULL,
- "body" text NOT NULL,
- "sig" text NOT NULL,
- "attach" text NOT NULL DEFAULT '',
- "mid" text NOT NULL,
- "parent_mid" text NOT NULL,
- "mail_deleted" smallint NOT NULL DEFAULT '0',
- "mail_replied" smallint NOT NULL DEFAULT '0',
- "mail_isreply" smallint NOT NULL DEFAULT '0',
- "mail_seen" smallint NOT NULL DEFAULT '0',
- "mail_recalled" smallint NOT NULL DEFAULT '0',
- "mail_obscured" smallint NOT NULL DEFAULT '0',
- "mail_raw" smallint NOT NULL DEFAULT '0',
- "created" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
- "expires" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
- PRIMARY KEY ("id")
-);
-create index "mail_convid" on mail ("convid");
-create index "mail_conv_guid" on mail ("conv_guid");
-create index "mail_created" on mail ("created");
-create index "mail_flags" on mail ("mail_flags");
-create index "mail_account_id" on mail ("account_id");
-create index "mail_channel_id" on mail ("channel_id");
-create index "mail_from_xchan" on mail ("from_xchan");
-create index "mail_to_xchan" on mail ("to_xchan");
-create index "mail_mid" on mail ("mid");
-create index "mail_parent_mid" on mail ("parent_mid");
-create index "mail_expires" on mail ("expires");
-create index "mail_deleted" on mail ("mail_deleted");
-create index "mail_replied" on mail ("mail_replied");
-create index "mail_isreply" on mail ("mail_isreply");
-create index "mail_seen" on mail ("mail_seen");
-create index "mail_recalled" on mail ("mail_recalled");
-create index "mail_obscured" on mail ("mail_obscured");
CREATE TABLE "menu" (
"menu_id" serial NOT NULL,
"menu_channel_id" bigint NOT NULL DEFAULT '0',