]> git.mxchange.org Git - friendica.git/blobdiff - database.sql
Merge pull request #11244 from MrPetovan/bug/11232-post-media-order
[friendica.git] / database.sql
index ed136e620638b7d9e431a26ec71e100317d5953b..ea129109dc366f0672b137081a06f5aa979990f3 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
--- Friendica 2021.12-rc (Siberian Iris)
--- DB_UPDATE_VERSION 1450
+-- Friendica 2022.05-dev (Siberian Iris)
+-- DB_UPDATE_VERSION 1451
 -- ------------------------------------------
 
 
@@ -644,10 +644,13 @@ CREATE TABLE IF NOT EXISTS `group` (
        `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner User id',
        `visible` boolean NOT NULL DEFAULT '0' COMMENT '1 indicates the member list is not private',
        `deleted` boolean NOT NULL DEFAULT '0' COMMENT '1 indicates the group has been deleted',
+       `cid` int unsigned COMMENT 'Contact id of forum. When this field is filled then the members are synced automatically.',
        `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'human readable name of group',
         PRIMARY KEY(`id`),
         INDEX `uid` (`uid`),
-       FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE
+        INDEX `cid` (`cid`),
+       FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE,
+       FOREIGN KEY (`cid`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
 ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='privacy groups, group info';
 
 --