[Database version 1498] New table "diaspora-contact" for Diaspora contacts (duh)

- Remove duplicated "author-uri-id" keys in view declarations
This commit is contained in:
Michael 2021-08-28 07:10:27 +00:00 committed by Hypolite Petovan
parent 32a9f39768
commit d5e005f90d
5 changed files with 189 additions and 8 deletions

View file

@ -55,7 +55,7 @@
use Friendica\Database\DBA;
if (!defined('DB_UPDATE_VERSION')) {
define('DB_UPDATE_VERSION', 1497);
define('DB_UPDATE_VERSION', 1498);
}
return [
@ -637,6 +637,39 @@ return [
"wid" => ["wid"],
]
],
"diaspora-contact" => [
"comment" => "Diaspora compatible contacts - used in the Diaspora implementation",
"fields" => [
"uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the contact URL"],
"addr" => ["type" => "varchar(255)", "comment" => ""],
"alias" => ["type" => "varchar(255)", "comment" => ""],
"nick" => ["type" => "varchar(255)", "comment" => ""],
"name" => ["type" => "varchar(255)", "comment" => ""],
"given-name" => ["type" => "varchar(255)", "comment" => ""],
"family-name" => ["type" => "varchar(255)", "comment" => ""],
"photo" => ["type" => "varchar(255)", "comment" => ""],
"photo-medium" => ["type" => "varchar(255)", "comment" => ""],
"photo-small" => ["type" => "varchar(255)", "comment" => ""],
"batch" => ["type" => "varchar(255)", "comment" => ""],
"notify" => ["type" => "varchar(255)", "comment" => ""],
"poll" => ["type" => "varchar(255)", "comment" => ""],
"subscribe" => ["type" => "varchar(255)", "comment" => ""],
"searchable" => ["type" => "boolean", "comment" => ""],
"pubkey" => ["type" => "text", "comment" => ""],
"gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
"created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
"updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
"interacting_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of contacts this contact interactes with"],
"interacted_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of contacts that interacted with this contact"],
"post_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of posts and comments"],
],
"indexes" => [
"PRIMARY" => ["uri-id"],
"addr" => ["UNIQUE", "addr"],
"alias" => ["alias"],
"gsid" => ["gsid"],
]
],
"diaspora-interaction" => [
"comment" => "Signed Diaspora Interaction",
"fields" => [