`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';
--
Fields
------
-| Field | Description | Type | Null | Key | Default | Extra |
-| ------- | ------------------------------------------ | ------------------ | ---- | --- | ------- | -------------- |
-| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment |
-| uid | Owner User id | mediumint unsigned | NO | | 0 | |
-| visible | 1 indicates the member list is not private | boolean | NO | | 0 | |
-| deleted | 1 indicates the group has been deleted | boolean | NO | | 0 | |
-| name | human readable name of group | varchar(255) | NO | | | |
+| Field | Description | Type | Null | Key | Default | Extra |
+| ------- | ----------------------------------------------------------------------------------------- | ------------------ | ---- | --- | ------- | -------------- |
+| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment |
+| uid | Owner User id | mediumint unsigned | NO | | 0 | |
+| visible | 1 indicates the member list is not private | boolean | NO | | 0 | |
+| deleted | 1 indicates the group has been deleted | boolean | NO | | 0 | |
+| cid | Contact id of forum. When this field is filled then the members are synced automatically. | int unsigned | YES | | NULL | |
+| name | human readable name of group | varchar(255) | NO | | | |
Indexes
------------
| ------- | ------ |
| PRIMARY | id |
| uid | uid |
+| cid | cid |
Foreign Keys
------------
| Field | Target Table | Target Field |
|-------|--------------|--------------|
| uid | [user](help/database/db_user) | uid |
+| cid | [contact](help/database/db_contact) | id |
Return to [database documentation](help/database)
"uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
"visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the member list is not private"],
"deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the group has been deleted"],
+ "cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Contact id of forum. When this field is filled then the members are synced automatically."],
"name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "human readable name of group"],
],
"indexes" => [
"PRIMARY" => ["id"],
"uid" => ["uid"],
+ "cid" => ["cid"],
]
],
"group_member" => [