New field for groups that are connected with forums

This commit is contained in:
Michael 2022-02-09 19:44:10 +00:00
parent 6c156e3bc6
commit 85eab6ebee
3 changed files with 16 additions and 8 deletions

View file

@ -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';
--

View file

@ -6,13 +6,14 @@ 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
------------
@ -21,6 +22,7 @@ Indexes
| ------- | ------ |
| PRIMARY | id |
| uid | uid |
| cid | cid |
Foreign Keys
------------
@ -28,5 +30,6 @@ 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)

View file

@ -704,11 +704,13 @@ return [
"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" => [