Merge pull request #6694 from Quix0r/rewrites/added-missing-var-init
[friendica.git/.git] / database.sql
index 5a3f84d..2102a93 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
--- Friendica 2019.01-rc (The Tazmans Flax-lily)
--- DB_UPDATE_VERSION 1293
+-- Friendica 2019.03-dev (The Tazmans Flax-lily)
+-- DB_UPDATE_VERSION 1300
 -- ------------------------------------------
 
 
@@ -64,6 +64,8 @@ CREATE TABLE IF NOT EXISTS `attach` (
        `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`)
 ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='file attachments';
 
@@ -641,6 +643,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 NOT NULL DEFAULT 0 COMMENT 'Initial number of delivery recipients, used as item.delivery_queue_count',
+       `queue_done` mediumint 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';
 
@@ -873,6 +877,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`),
@@ -1254,7 +1260,7 @@ CREATE TABLE IF NOT EXISTS `worker-ipc` (
 --
 CREATE TABLE IF NOT EXISTS `workerqueue` (
        `id` int unsigned NOT NULL auto_increment COMMENT 'Auto incremented worker task id',
-       `parameter` mediumblob COMMENT 'Task command',
+       `parameter` mediumtext COMMENT 'Task command',
        `priority` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Task priority',
        `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Creation date',
        `pid` int unsigned NOT NULL DEFAULT 0 COMMENT 'Process id of the worker',
@@ -1272,4 +1278,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';
+