-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sumner Evans <[email protected]>
- Loading branch information
1 parent
f4f7ac0
commit c7a67e6
Showing
3 changed files
with
14 additions
and
58 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,35 @@ | ||
-- v0 -> v2: Latest revision | ||
|
||
CREATE TABLE IF NOT EXISTS user_filter_ids ( | ||
user_id VARCHAR(255) PRIMARY KEY, | ||
filter_id VARCHAR(255) | ||
user_id TEXT PRIMARY KEY, | ||
filter_id TEXT | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS user_batch_tokens ( | ||
user_id VARCHAR(255) PRIMARY KEY, | ||
next_batch_token VARCHAR(255) | ||
user_id TEXT PRIMARY KEY, | ||
next_batch_token TEXT | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS rooms ( | ||
room_id VARCHAR(255) PRIMARY KEY, | ||
encryption_event VARCHAR(65535) NULL | ||
room_id TEXT PRIMARY KEY, | ||
encryption_event TEXT | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS room_members ( | ||
room_id VARCHAR(255), | ||
user_id VARCHAR(255), | ||
room_id TEXT, | ||
user_id TEXT, | ||
PRIMARY KEY (room_id, user_id) | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS chatwoot_conversation_to_matrix_room ( | ||
matrix_room_id VARCHAR(255) UNIQUE, | ||
chatwoot_conversation_id INTEGER UNIQUE, | ||
matrix_room_id TEXT UNIQUE, | ||
chatwoot_conversation_id INTEGER UNIQUE, | ||
most_recent_event_id TEXT, | ||
PRIMARY KEY (matrix_room_id, chatwoot_conversation_id) | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS chatwoot_message_to_matrix_event ( | ||
matrix_event_id VARCHAR(255) UNIQUE, | ||
matrix_event_id TEXT, | ||
chatwoot_message_id INTEGER, | ||
PRIMARY KEY (matrix_event_id, chatwoot_message_id) | ||
); | ||
|
||
ALTER TABLE chatwoot_conversation_to_matrix_room | ||
ADD COLUMN IF NOT EXISTS most_recent_event_id VARCHAR(255); | ||
|
||
ALTER TABLE chatwoot_message_to_matrix_event | ||
DROP CONSTRAINT IF EXISTS chatwoot_message_to_matrix_event_matrix_event_id_key; |
This file was deleted.
Oops, something went wrong.
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