use Friendica\Database\DBA;
if (!defined('DB_UPDATE_VERSION')) {
- define('DB_UPDATE_VERSION', 1451);
+ define('DB_UPDATE_VERSION', 1461);
}
return [
"fields" => [
"id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
"name" => ["type" => "varchar(96)", "not null" => "1", "default" => "", "comment" => ""],
- "url" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""]
+ "url" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "type" => ["type" => "tinyint unsigned", "comment" => "Type of the tag (Unknown, General Collection, Follower Collection or Account)"],
],
"indexes" => [
"PRIMARY" => ["id"],
"inbox" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
"outbox" => ["type" => "varchar(255)", "comment" => ""],
"sharedinbox" => ["type" => "varchar(255)", "comment" => ""],
+ "featured" => ["type" => "varchar(255)", "comment" => "Address for the collection of featured posts"],
+ "featured-tags" => ["type" => "varchar(255)", "comment" => "Address for the collection of featured tags"],
"manually-approve" => ["type" => "boolean", "comment" => ""],
"discoverable" => ["type" => "boolean", "comment" => "Mastodon extension: true if profile is published in their directory"],
"nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"PRIMARY" => ["uri-id"]
]
],
+ "endpoint" => [
+ "comment" => "ActivityPub endpoints - used in the ActivityPub implementation",
+ "fields" => [
+ "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "URL of the contact"],
+ "type" => ["type" => "varchar(20)", "not null" => "1", "comment" => ""],
+ "owner-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the apcontact url"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["url"],
+ "owner-uri-id_type" => ["UNIQUE", "owner-uri-id", "type"],
+ ]
+ ],
"event" => [
"comment" => "Events",
"fields" => [
]
],
"notify" => [
- "comment" => "notifications",
+ "comment" => "[Deprecated] User notifications",
"fields" => [
"id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
"type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
"uid" => ["uid"],
]
],
+ "post-collection" => [
+ "comment" => "Collection of posts",
+ "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 item uri"],
+ "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "0 - Featured"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["uri-id", "type"],
+ "type" => ["type"],
+ ]
+ ],
"post-content" => [
"comment" => "Content for all posts",
"fields" => [
"uri-id-url" => ["UNIQUE", "uri-id", "url"],
]
],
+ "post-question" => [
+ "comment" => "Question",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "uri-id" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
+ "multiple" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Multiple choice"],
+ "voters" => ["type" => "int unsigned", "comment" => "Number of voters for this question"],
+ "end-time" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Question end time"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "uri-id" => ["UNIQUE", "uri-id"],
+ ]
+ ],
+ "post-question-option" => [
+ "comment" => "Question option",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => "Id of the question"],
+ "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"],
+ "name" => ["type" => "varchar(255)", "comment" => "Name of the option"],
+ "replies" => ["type" => "int unsigned", "comment" => "Number of replies for this question option"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["uri-id", "id"],
+ ]
+ ],
"post-tag" => [
"comment" => "post relation to tags",
"fields" => [
"changed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date that something in the conversation changed, indicating clients should fetch the conversation again"],
"commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
"uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
- "pinned" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "The thread is pinned on the profile page"],
+ "pinned" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"],
"starred" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
"ignored" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Ignore updates for this thread"],
"wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
"commented" => ["commented"],
"uid_received" => ["uid", "received"],
"uid_wall_received" => ["uid", "wall", "received"],
- "uid_pinned" => ["uid", "pinned"],
"uid_commented" => ["uid", "commented"],
"uid_starred" => ["uid", "starred"],
"uid_mention" => ["uid", "mention"],
"ignored" => ["type" => "boolean", "comment" => "Posts from this contact are ignored"],
"collapsed" => ["type" => "boolean", "comment" => "Posts from this contact are collapsed"],
"hidden" => ["type" => "boolean", "comment" => "This contact is hidden from the others"],
+ "is-blocked" => ["type" => "boolean", "comment" => "User is blocked by this contact"],
"pending" => ["type" => "boolean", "comment" => ""],
"rel" => ["type" => "tinyint unsigned", "comment" => "The kind of the relation between the user and the contact"],
"info" => ["type" => "mediumtext", "comment" => ""],