+ "delivery-queue" => [
+ "comment" => "Delivery data for posts for the batch processing",
+ "fields" => [
+ "gsid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Target server"],
+ "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Delivered post"],
+ "created" => ["type" => "datetime", "comment" => ""],
+ "command" => ["type" => "varbinary(32)", "comment" => ""],
+ "cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Target contact"],
+ "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Delivering user"],
+ "failed" => ["type" => "tinyint", "default" => 0, "comment" => "Number of times the delivery has failed"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["uri-id", "gsid"],
+ "gsid_created" => ["gsid", "created"],
+ "uid" => ["uid"],
+ "cid" => ["cid"],
+ ]
+ ],
+ "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"],
+ ]
+ ],