Skip to content

Commit 8ac3340

Browse files
committed
Feature #14033
Change in Community component: * for each community space, a group of members is created in the mixed domain. The group will have as name the name of the community space and it will be referrenced by the community of users. The creation is lazy, meaning it is created only when the first user become a member of the community. A symbol can be set with the group's name to identify in a glance such group of members from the more usual user groups. A default emoticon is defined as such a symbol in the community settings. * such a members group allows the users in it to be notified or for another user to have a glance of the members of the community. For doing, the members group is set automatically as a reader of the community space. * the members group is synchronized with the users playing a role in the community space. * the synchronization delay is removed. * when a community space is removed (put in the bin), to be compliant with the standard behaviour in which all roles played in the space are deleted, both the memberships to the community and the members group are deleted. * when a community of users (the application) is removed (put in the bin), the members group is also removed (put in the bin). In the case the community is recovered, the members group is also recovered. A database migration step is added in which a new field, groupid, is added in the table sc_community. Because the creation of the members group is lazy, no script in the migration is provided to create such a group for existing community of users. The group for these communities will be created by synchronization when accessing them.
1 parent 1bde995 commit 8ac3340

File tree

34 files changed

+1425
-346
lines changed

34 files changed

+1425
-346
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CREATE INDEX idx_Community_Component ON SC_Community (id, instanceId);
2+
CREATE INDEX idx_Community_Space ON SC_Community (id, spaceId);
3+
CREATE INDEX idx_Community_Membership ON SC_Community_Membership (id, community);
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
CREATE TABLE IF NOT EXISTS SC_Community
2+
(
3+
id VARCHAR(40) PRIMARY KEY,
4+
instanceId VARCHAR(30) NOT NULL,
5+
spaceId VARCHAR(30) NOT NULL,
6+
groupId INT NULL,
7+
homePage VARCHAR(400) NULL,
8+
homePageType INT NULL,
9+
charterURL VARCHAR(400) NULL,
10+
CONSTRAINT UN_COMMUNITY UNIQUE (instanceId, spaceId),
11+
CONSTRAINT FK_GROUP FOREIGN KEY (groupId) REFERENCES st_group (id)
12+
);
13+
14+
CREATE TABLE SC_Community_Membership
15+
(
16+
id VARCHAR(40) PRIMARY KEY,
17+
community VARCHAR(40) NOT NULL,
18+
status VARCHAR(15) NOT NULL,
19+
userId INT NOT NULL,
20+
joiningDate TIMESTAMP NULL,
21+
createDate TIMESTAMP NOT NULL,
22+
createdBy VARCHAR(40) NOT NULL,
23+
lastUpdateDate TIMESTAMP NOT NULL,
24+
lastUpdatedBy VARCHAR(40) NOT NULL,
25+
version INT8 NOT NULL,
26+
CONSTRAINT FK_COMMUNITY FOREIGN KEY (community) REFERENCES SC_Community (id),
27+
CONSTRAINT FK_USER FOREIGN KEY (userid) REFERENCES st_user (id)
28+
);
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE SC_Community ADD groupId INT NULL;
2+
ALTER TABLE SC_Community ADD CONSTRAINT FK_GROUP FOREIGN KEY (groupId) REFERENCES st_group (id);
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CREATE INDEX idx_Community_Component ON SC_Community (id, instanceId);
2+
CREATE INDEX idx_Community_Space ON SC_Community (id, spaceId);
3+
CREATE INDEX idx_Community_Membership ON SC_Community_Membership (id, community);
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
CREATE TABLE SC_Community
2+
(
3+
id VARCHAR(40) PRIMARY KEY,
4+
instanceId VARCHAR(30) NOT NULL,
5+
spaceId VARCHAR(40) NOT NULL,
6+
groupId INT NULL,
7+
homePage VARCHAR(400) NULL,
8+
homePageType INT NULL,
9+
charterURL VARCHAR(400) NULL,
10+
CONSTRAINT UN_COMMUNITY UNIQUE (instanceId, spaceId),
11+
CONSTRAINT FK_GROUP FOREIGN KEY (groupId) REFERENCES st_group (id)
12+
);
13+
14+
CREATE TABLE SC_Community_Membership
15+
(
16+
id VARCHAR(40) PRIMARY KEY,
17+
community VARCHAR(40) NOT NULL,
18+
userId INT NOT NULL,
19+
status VARCHAR(15) NOT NULL,
20+
joiningDate DATETIME NULL,
21+
createDate DATETIME NOT NULL,
22+
createdBy VARCHAR(40) NOT NULL,
23+
lastUpdateDate DATETIME NOT NULL,
24+
lastUpdatedBy VARCHAR(40) NOT NULL,
25+
version BIGINT NOT NULL,
26+
CONSTRAINT FK_COMMUNITY FOREIGN KEY (community) REFERENCES SC_Community (id),
27+
CONSTRAINT FK_USER FOREIGN KEY (userId) REFERENCES st_user (id)
28+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE SC_Community ADD groupId INT NULL;
2+
ALTER TABLE SC_Community ADD CONSTRAINT FK_GROUP FOREIGN KEY (groupId) REFERENCES st_group (id);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CREATE INDEX idx_Community_Component ON SC_Community (id, instanceId);
2+
CREATE INDEX idx_Community_Space ON SC_Community (id, spaceId);
3+
CREATE INDEX idx_Community_Membership ON SC_Community_Membership (id, community);
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
CREATE TABLE SC_Community
2+
(
3+
id VARCHAR(40) PRIMARY KEY,
4+
instanceId VARCHAR(30) NOT NULL,
5+
spaceId VARCHAR(40) NOT NULL,
6+
groupId INT NULL,
7+
homePage VARCHAR(400) NULL,
8+
homePageType INT NULL,
9+
charterURL VARCHAR(400) NULL,
10+
CONSTRAINT UN_COMMUNITY UNIQUE (instanceId, spaceId),
11+
CONSTRAINT FK_GROUP FOREIGN KEY (groupId) REFERENCES st_group (id)
12+
);
13+
14+
CREATE TABLE SC_Community_Membership
15+
(
16+
id VARCHAR(40) PRIMARY KEY,
17+
community VARCHAR(40) NOT NULL,
18+
userId INT NOT NULL,
19+
status VARCHAR(15) NOT NULL,
20+
joiningDate TIMESTAMP NULL,
21+
createDate TIMESTAMP NOT NULL,
22+
createdBy VARCHAR(40) NOT NULL,
23+
lastUpdateDate TIMESTAMP NOT NULL,
24+
lastUpdatedBy VARCHAR(40) NOT NULL,
25+
version NUMBER(19, 0) NOT NULL,
26+
CONSTRAINT FK_COMMUNITY FOREIGN KEY (community) REFERENCES SC_Community (id),
27+
CONSTRAINT FK_USER FOREIGN KEY (userid) REFERENCES st_user (id)
28+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE SC_Community ADD groupId INT NULL;
2+
ALTER TABLE SC_Community ADD CONSTRAINT FK_GROUP FOREIGN KEY (groupId) REFERENCES st_group (id);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CREATE INDEX idx_Community_Component ON SC_Community (id, instanceId);
2+
CREATE INDEX idx_Community_Space ON SC_Community (id, spaceId);
3+
CREATE INDEX idx_Community_Membership ON SC_Community_Membership (id, community);

0 commit comments

Comments
 (0)