mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-14 20:26:13 +00:00
schema
This commit is contained in:
@@ -28,11 +28,28 @@ CREATE INDEX idx_chat_relays_user_id ON chat_relays(user_id);
|
||||
ALTER TABLE users ADD COLUMN is_user_chat_relay INTEGER NOT NULL DEFAULT 0;
|
||||
|
||||
ALTER TABLE group_members ADD COLUMN is_chat_relay INTEGER NOT NULL DEFAULT 0;
|
||||
|
||||
-- Relay's link for group
|
||||
ALTER TABLE groups ADD COLUMN relay_link BLOB;
|
||||
|
||||
-- Owner's list of relays for group
|
||||
-- TBC relay_status: invited/accepted/added/notified/confirmed
|
||||
-- relay_link: links for all relays are included in GroupShortLinkData
|
||||
CREATE TABLE group_relays(
|
||||
group_relay_id INTEGER PRIMARY KEY,
|
||||
group_id INTEGER NOT NULL REFERENCES groups ON DELETE CASCADE,
|
||||
relay_status TEXT NOT NULL,
|
||||
relay_link BLOB
|
||||
);
|
||||
|]
|
||||
|
||||
down_m20251016_chat_relays :: Query
|
||||
down_m20251016_chat_relays =
|
||||
[sql|
|
||||
DROP TABLE group_relays;
|
||||
|
||||
ALTER TABLE groups DROP COLUMN relay_link;
|
||||
|
||||
ALTER TABLE group_members DROP COLUMN is_chat_relay;
|
||||
|
||||
ALTER TABLE users DROP COLUMN is_user_chat_relay;
|
||||
|
||||
Reference in New Issue
Block a user