]> git.mxchange.org Git - friendica.git/blobdiff - database.sql
Merge pull request #10179 from nupplaphil/fix/transifex_script
[friendica.git] / database.sql
index 1c835587b1bfd5190301656b0d44b99d503ded02..7a18fad5cbb397878765c14520aa5de7228c58b2 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
--- Friendica 2021.03-rc (Red Hot Poker)
--- DB_UPDATE_VERSION 1412
+-- Friendica 2021.06-dev (Siberian Iris)
+-- DB_UPDATE_VERSION 1414
 -- ------------------------------------------
 
 
@@ -934,7 +934,7 @@ CREATE TABLE IF NOT EXISTS `post` (
        `owner-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Link to the contact table with uid=0 of the owner of this item',
        `author-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Link to the contact table with uid=0 of the author of this item',
        `causer-id` int unsigned COMMENT 'Link to the contact table with uid=0 of the contact that caused the item creation',
-       `post-type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Post type (personal note, bookmark, ...)',
+       `post-type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Post type (personal note, image, article, ...)',
        `vid` smallint unsigned COMMENT 'Id of the verb table entry that contains the activity verbs',
        `private` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '0=public, 1=private, 2=unlisted',
        `global` boolean NOT NULL DEFAULT '0' COMMENT '',
@@ -1037,6 +1037,13 @@ CREATE TABLE IF NOT EXISTS `post-media` (
        `preview-height` smallint unsigned COMMENT 'Height of the preview picture',
        `preview-width` smallint unsigned COMMENT 'Width of the preview picture',
        `description` text COMMENT '',
+       `name` varchar(255) COMMENT 'Name of the media',
+       `author-url` varbinary(255) COMMENT 'URL of the author of the media',
+       `author-name` varchar(255) COMMENT 'Name of the author of the media',
+       `author-image` varbinary(255) COMMENT 'Image of the author of the media',
+       `publisher-url` varbinary(255) COMMENT 'URL of the publisher of the media',
+       `publisher-name` varchar(255) COMMENT 'Name of the publisher of the media',
+       `publisher-image` varbinary(255) COMMENT 'Image of the publisher of the media',
         PRIMARY KEY(`id`),
         UNIQUE INDEX `uri-id-url` (`uri-id`,`url`),
        FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
@@ -1100,7 +1107,8 @@ CREATE TABLE IF NOT EXISTS `post-user` (
        `owner-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Link to the contact table with uid=0 of the owner of this item',
        `author-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Link to the contact table with uid=0 of the author of this item',
        `causer-id` int unsigned COMMENT 'Link to the contact table with uid=0 of the contact that caused the item creation',
-       `post-type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Post type (personal note, bookmark, ...)',
+       `post-type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Post type (personal note, image, article, ...)',
+       `post-reason` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Reason why the post arrived at the user',
        `vid` smallint unsigned COMMENT 'Id of the verb table entry that contains the activity verbs',
        `private` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '0=public, 1=private, 2=unlisted',
        `global` boolean NOT NULL DEFAULT '0' COMMENT '',
@@ -1488,6 +1496,7 @@ CREATE VIEW `post-user-view` AS SELECT
        `post-user`.`received` AS `received`,
        `post-thread-user`.`changed` AS `changed`,
        `post-user`.`post-type` AS `post-type`,
+       `post-user`.`post-reason` AS `post-reason`,
        `post-user`.`private` AS `private`,
        `post-thread-user`.`pubmail` AS `pubmail`,
        `post-user`.`visible` AS `visible`,
@@ -1647,6 +1656,7 @@ CREATE VIEW `post-thread-user-view` AS SELECT
        `post-thread-user`.`received` AS `received`,
        `post-thread-user`.`changed` AS `changed`,
        `post-user`.`post-type` AS `post-type`,
+       `post-user`.`post-reason` AS `post-reason`,
        `post-user`.`private` AS `private`,
        `post-thread-user`.`pubmail` AS `pubmail`,
        `post-thread-user`.`ignored` AS `ignored`,