]> git.mxchange.org Git - friendica.git/blobdiff - database.sql
Photo model. Small fix to `update()`
[friendica.git] / database.sql
index 9bbc056d62efb63b98be9b6650aad7d6e1735540..a692b447f78599d4f82c513737750591af56bf4b 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
--- Friendica 2018.12-dev (The Tazmans Flax-lily)
--- DB_UPDATE_VERSION 1290
+-- Friendica 2019.03-dev (The Tazmans Flax-lily)
+-- DB_UPDATE_VERSION 1297
 -- ------------------------------------------
 
 
@@ -31,6 +31,7 @@ CREATE TABLE IF NOT EXISTS `apcontact` (
        `inbox` varchar(255) NOT NULL COMMENT '',
        `outbox` varchar(255) COMMENT '',
        `sharedinbox` varchar(255) COMMENT '',
+       `manually-approve` boolean COMMENT '',
        `nick` varchar(255) NOT NULL DEFAULT '' COMMENT '',
        `name` varchar(255) COMMENT '',
        `about` text COMMENT '',
@@ -578,6 +579,7 @@ CREATE TABLE IF NOT EXISTS `item` (
         INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`),
         INDEX `authorid_created` (`author-id`,`created`),
         INDEX `ownerid` (`owner-id`),
+        INDEX `contact-id` (`contact-id`),
         INDEX `uid_uri` (`uid`,`uri`(190)),
         INDEX `resource-id` (`resource-id`),
         INDEX `deleted_changed` (`deleted`,`changed`),
@@ -639,6 +641,8 @@ CREATE TABLE IF NOT EXISTS `item-delivery-data` (
        `iid` int unsigned NOT NULL COMMENT 'Item id',
        `postopts` text COMMENT 'External post connectors add their network name to this comma-separated string to identify that they should be delivered to these networks during delivery',
        `inform` mediumtext COMMENT 'Additional receivers of the linked item',
+       `queue_count` mediumint(9) NOT NULL DEFAULT '0' COMMENT 'Initial number of delivery recipients, used as item.delivery_queue_count',
+       `queue_done` mediumint(9) NOT NULL DEFAULT '0' COMMENT 'Number of successful deliveries, used as item.delivery_queue_done',
         PRIMARY KEY(`iid`)
 ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Delivery data for items';
 
@@ -813,7 +817,9 @@ CREATE TABLE IF NOT EXISTS `participation` (
        `server` varchar(60) NOT NULL COMMENT '',
        `cid` int unsigned NOT NULL COMMENT '',
        `fid` int unsigned NOT NULL COMMENT '',
-        PRIMARY KEY(`iid`,`server`)
+        PRIMARY KEY(`iid`,`server`),
+        INDEX `cid` (`cid`),
+        INDEX `fid` (`fid`)
 ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Storage for participation messages from Diaspora';
 
 --
@@ -869,6 +875,8 @@ CREATE TABLE IF NOT EXISTS `photo` (
        `allow_gid` mediumtext COMMENT 'Access Control - list of allowed groups',
        `deny_cid` mediumtext COMMENT 'Access Control - list of denied contact.id',
        `deny_gid` mediumtext COMMENT 'Access Control - list of denied groups',
+       `backend-class` tinytext COMMENT 'Storage backend class',
+       `backend-ref` text COMMENT 'Storage backend data reference',
         PRIMARY KEY(`id`),
         INDEX `contactid` (`contact-id`),
         INDEX `uid_contactid` (`uid`,`contact-id`),
@@ -967,7 +975,8 @@ CREATE TABLE IF NOT EXISTS `profile` (
        `publish` boolean NOT NULL DEFAULT '0' COMMENT 'publish default profile in local directory',
        `net-publish` boolean NOT NULL DEFAULT '0' COMMENT 'publish profile in global directory',
         PRIMARY KEY(`id`),
-        INDEX `uid_is-default` (`uid`,`is-default`)
+        INDEX `uid_is-default` (`uid`,`is-default`),
+        FULLTEXT INDEX `pub_keywords` (`pub_keywords`)
 ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='user profiles data';
 
 --
@@ -1267,4 +1276,13 @@ CREATE TABLE IF NOT EXISTS `workerqueue` (
         INDEX `done_next_try` (`done`,`next_try`)
 ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Background tasks queue entries';
 
+--
+-- TABLE storage
+--
+CREATE TABLE IF NOT EXISTS `storage` (
+       `id` int unsigned NOT NULL auto_increment COMMENT 'Auto incremented image data id',
+       `data` longblob NOT NULL COMMENT 'file data',
+        PRIMARY KEY(`id`)
+) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Data stored by Database storage backend';
+