-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#369 and #370: Add support for the clear chat room history event #408
Closed
hqv126
wants to merge
14
commits into
igniterealtime:main
from
hqv126:369-370_Clear-chat-room-history
Closed
Changes from 10 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
782dafb
#369 and #370 Clear Chat Room History
a0093be
#369 and #370 Clear Chat Room History
c39c099
#369 and #370 Clear Chat Room History
0578a54
#369 and #370 Clear Chat Room History
245f9d8
#369 and #370 Clear Chat Room History
5e5b166
#369 and #370 Clear Chat Room History
b27c905
#369 and #370 Clear Chat Room History
e835846
#369 and #370 Clear Chat Room History
626b152
#369 and #370 Clear Chat Room History
3dddfbc
#369 and #370 Clear Chat Room History
577d63a
#369 and #370 Clear Chat Room History
ccb73f2
#369 and #370 Clear Chat Room History
80682f0
#369 and #370 Clear Chat Room History
6a625c7
#369 and #370 Clear Chat Room History
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
|
||
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 8); | ||
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 9); | ||
|
||
CREATE TABLE ofMucRoomStatus ( | ||
roomID INTEGER NOT NULL, | ||
roomJID VARCHAR2(1024) NOT NULL, | ||
roomDestroyed NUMBER(2) NOT NULL, | ||
CONSTRAINT ofMucRoomStatus_pk PRIMARY KEY (roomID) | ||
); | ||
|
||
CREATE TABLE ofConversation ( | ||
roomID INTEGER NOT NULL, | ||
conversationID INTEGER NOT NULL, | ||
room VARCHAR2(1024) NULL, | ||
isExternal NUMBER(2) NOT NULL, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems to miss the index that's created for other databases. |
||
|
@@ -10,22 +18,25 @@ CREATE TABLE ofConversation ( | |
messageCount INT NOT NULL, | ||
CONSTRAINT ofConversation_pk PRIMARY KEY (conversationID) | ||
); | ||
CREATE INDEX ofConversation_room_idx ON ofConversation (roomID); | ||
CREATE INDEX ofConversation_ext_idx ON ofConversation (isExternal); | ||
CREATE INDEX ofConversation_start_idx ON ofConversation (startDate); | ||
CREATE INDEX ofConversation_last_idx ON ofConversation (lastActivity); | ||
|
||
CREATE TABLE ofConParticipant ( | ||
roomID INTEGER NOT NULL, | ||
conversationID INTEGER NOT NULL, | ||
joinedDate INTEGER NOT NULL, | ||
leftDate INTEGER NULL, | ||
bareJID VARCHAR2(255) NOT NULL, | ||
jidResource VARCHAR2(255) NOT NULL, | ||
nickname VARCHAR2(255) NULL | ||
); | ||
CREATE INDEX ofConParticipant_conv_idx ON ofConParticipant (conversationID, bareJID, jidResource, joinedDate); | ||
CREATE INDEX ofConParticipant_conv_idx ON ofConParticipant (roomID, conversationID, bareJID, jidResource, joinedDate); | ||
CREATE INDEX ofConParticipant_jid_idx ON ofConParticipant (bareJID); | ||
|
||
CREATE TABLE ofMessageArchive ( | ||
roomID INTEGER NOT NULL, | ||
messageID INTEGER NULL, | ||
conversationID INTEGER NOT NULL, | ||
fromJID VARCHAR2(1024) NOT NULL, | ||
|
@@ -37,6 +48,7 @@ CREATE TABLE ofMessageArchive ( | |
body CLOB NULL, | ||
isPMforJID VARCHAR2(1024) NULL | ||
); | ||
CREATE INDEX ofMessageArchive_room_idx ON ofMessageArchive (roomID); | ||
CREATE INDEX ofMessageArchive_con_idx ON ofMessageArchive (conversationID); | ||
CREATE INDEX ofMessageArchive_fromjid_idx ON ofMessageArchive (fromJID); | ||
CREATE INDEX ofMessageArchive_tojid_idx ON ofMessageArchive (toJID); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
CREATE TABLE ofMucRoomStatus ( | ||
roomID INTEGER NOT NULL, | ||
roomJID VARCHAR(512) NOT NULL, | ||
roomDestroyed INTEGER NOT NULL, | ||
CONSTRAINT ofMucRoomStatus_pk PRIMARY KEY (roomID) | ||
); | ||
|
||
ALTER TABLE ofConversation ADD COLUMN roomID INTEGER DEFAULT -1 NOT NULL; | ||
CREATE INDEX ofConversation_room_idx ON ofConversation (roomID); | ||
|
||
ALTER TABLE ofConParticipant ADD COLUMN roomID INTEGER DEFAULT -1 NOT NULL; | ||
DROP INDEX entConPar_con_idx; | ||
CREATE INDEX entConPar_con_idx ON ofConParticipant (roomID, conversationID, bareJID, jidResource, joinedDate); | ||
|
||
ALTER TABLE ofMessageArchive ADD COLUMN roomID INTEGER DEFAULT -1 NOT NULL; | ||
CREATE INDEX ofMessageArchive_room_idx ON ofMessageArchive (roomID); | ||
|
||
-- Update database version | ||
UPDATE ofVersion SET version = 9 WHERE name = 'monitoring'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
CREATE TABLE ofMucRoomStatus ( | ||
roomID BIGINT NOT NULL, | ||
roomJID VARCHAR(1024) NOT NULL, | ||
roomDestroyed INT NOT NULL, | ||
CONSTRAINT ofMucRoomStatus_pk PRIMARY KEY (roomID) | ||
); | ||
|
||
ALTER TABLE ofConversation ADD COLUMN roomID BIGINT DEFAULT -1 NOT NULL; | ||
CREATE INDEX ofConversation_room_idx ON ofConversation (roomID); | ||
|
||
ALTER TABLE ofConParticipant ADD COLUMN roomID BIGINT DEFAULT -1 NOT NULL; | ||
DROP INDEX ofConParticipant_conv_idx; | ||
CREATE INDEX ofConParticipant_conv_idx ON ofConParticipant (roomID, conversationID, bareJID, jidResource, joinedDate); | ||
|
||
ALTER TABLE ofMessageArchive ADD COLUMN roomID BIGINT DEFAULT -1 NOT NULL; | ||
CREATE INDEX ofMessageArchive_room_idx ON ofMessageArchive (roomID); | ||
|
||
-- Update database version | ||
UPDATE ofVersion SET version = 9 WHERE name = 'monitoring'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
CREATE TABLE ofMucRoomStatus ( | ||
roomID BIGINT NOT NULL, | ||
roomJID VARCHAR(255) NOT NULL, | ||
roomDestroyed TINYINT NOT NULL, | ||
PRIMARY KEY (roomID) | ||
); | ||
|
||
ALTER TABLE ofConversation ADD COLUMN roomID BIGINT NOT NULL DEFAULT -1; | ||
CREATE INDEX ofConversation_room_idx ON ofConversation (roomID); | ||
|
||
ALTER TABLE ofConParticipant ADD COLUMN roomID BIGINT NOT NULL DEFAULT -1; | ||
DROP INDEX ofConParticipant_conv_idx ON ofConParticipant; | ||
CREATE INDEX ofConParticipant_conv_idx ON ofConParticipant (roomID, conversationID, bareJID, jidResource, joinedDate); | ||
|
||
ALTER TABLE ofMessageArchive ADD COLUMN roomID BIGINT NOT NULL DEFAULT -1; | ||
CREATE INDEX ofMessageArchive_room_idx ON ofMessageArchive (roomID); | ||
|
||
-- Update database version | ||
UPDATE ofVersion SET version = 9 WHERE name = 'monitoring'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
CREATE TABLE ofMucRoomStatus ( | ||
roomID INTEGER NOT NULL, | ||
roomJID VARCHAR2(1024) NOT NULL, | ||
roomDestroyed NUMBER(2) NOT NULL, | ||
CONSTRAINT ofMucRoomStatus_pk PRIMARY KEY (roomID) | ||
); | ||
|
||
ALTER TABLE ofConversation ADD (roomID INTEGER DEFAULT -1 NOT NULL); | ||
CREATE INDEX ofConversation_room_idx ON ofConversation (roomID); | ||
|
||
ALTER TABLE ofConParticipant ADD (roomID INTEGER DEFAULT -1 NOT NULL); | ||
DROP INDEX ofConParticipant_conv_idx; | ||
CREATE INDEX ofConParticipant_conv_idx ON ofConParticipant (roomID, conversationID, bareJID, jidResource, joinedDate); | ||
|
||
ALTER TABLE ofMessageArchive ADD (roomID INTEGER DEFAULT -1 NOT NULL); | ||
CREATE INDEX ofMessageArchive_room_idx ON ofMessageArchive (roomID); | ||
|
||
-- Update database version | ||
UPDATE ofVersion SET version = 9 WHERE name = 'monitoring'; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the
room
andisExernal
columns be moved to the new table?