X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=static%2Fdbstructure.config.php;h=5cbd7cd2bee6edea439f40d476c9315cacfb0489;hb=38196aec674ca9acc5db7e72898b52906f0d9070;hp=534f35080eb7748a2e95afb65c59c77631f89bd3;hpb=baaf34f02b87a11774f1d9b3ba30e926df0d0d52;p=friendica.git diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 534f35080e..5cbd7cd2be 100644 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -46,7 +46,7 @@ * ], * * Whenever possible prefer "foreign" before "relation" with the foreign keys. - * "foreign" adds true foreign keys on the database level, while "relation" simulates this behaviour. + * "foreign" adds true foreign keys on the database level, while "relation" is just an indicator of a table relation without any consequences * * If you need to make any change, make sure to increment the DB_UPDATE_VERSION constant value below. * @@ -55,7 +55,7 @@ use Friendica\Database\DBA; if (!defined('DB_UPDATE_VERSION')) { - define('DB_UPDATE_VERSION', 1406); + define('DB_UPDATE_VERSION', 1412); } return [ @@ -245,6 +245,7 @@ return [ "blocked_uid" => ["blocked", "uid"], "uid_rel_network_poll" => ["uid", "rel", "network", "poll(64)", "archive"], "uid_network_batch" => ["uid", "network", "batch(64)"], + "batch_contact-type" => ["batch(64)", "contact-type"], "addr_uid" => ["addr(128)", "uid"], "nurl_uid" => ["nurl(128)", "uid"], "nick_uid" => ["nick(128)", "uid"], @@ -255,6 +256,9 @@ return [ "uid_network_self_lastupdate" => ["uid", "network", "self", "last-update"], "uid_lastitem" => ["uid", "last-item"], "baseurl" => ["baseurl(64)"], + "uid_contact-type" => ["uid", "contact-type"], + "uid_self_contact-type" => ["uid", "self", "contact-type"], + "self_network_uid" => ["self", "network", "uid"], "gsid" => ["gsid"] ] ], @@ -993,7 +997,7 @@ return [ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"], "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the owner of this item"], "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the author of this item"], - "causer-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"], + "causer-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"], "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, bookmark, ...)"], "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"], "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"], @@ -1114,7 +1118,7 @@ return [ "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 item uri"], "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"], "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"], - "causer-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"], + "causer-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"], "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""], "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], @@ -1128,7 +1132,6 @@ return [ "causer-id" => ["causer-id"], "received" => ["received"], "commented" => ["commented"], - "changed" => ["changed"] ] ], "post-user" => [ @@ -1146,7 +1149,7 @@ return [ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"], "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the owner of this item"], "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the author of this item"], - "causer-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"], + "causer-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"], "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, bookmark, ...)"], "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"], "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"], @@ -1181,11 +1184,10 @@ return [ "author-id_uid" => ["author-id", "uid"], "author-id_received" => ["author-id", "received"], "parent-uri-id_uid" => ["parent-uri-id", "uid"], - "uid_hidden" => ["uid", "hidden"], "uid_contactid" => ["uid", "contact-id"], "uid_unseen_contactid" => ["uid", "unseen", "contact-id"], "uid_unseen" => ["uid", "unseen"], - "uid_unseen_wall" => ["uid", "unseen", "wall"], + "uid_hidden_uri-id" => ["uid", "hidden", "uri-id"], ], ], "post-thread-user" => [ @@ -1194,7 +1196,7 @@ return [ "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 item uri"], "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"], "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"], - "causer-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"], + "causer-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"], "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""], "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], @@ -1226,11 +1228,10 @@ return [ "psid" => ["psid"], "post-user-id" => ["post-user-id"], "commented" => ["commented"], - "received" => ["received"], - "author-id_received" => ["author-id", "received"], + "uid_received" => ["uid", "received"], "uid_pinned" => ["uid", "pinned"], "uid_commented" => ["uid", "commented"], - "mention_uid" => ["mention", "uid"], + "uid_starred" => ["uid", "starred"], "uid_mention" => ["uid", "mention"], ] ],