This commit is contained in:
spaced4ndy
2025-10-20 19:14:30 +04:00
parent e1144af6f4
commit ec20da4f75

View File

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