feat(social): add listening activity, shared rooms and modern chat
ci / api / api (push) Canceled after 0s
ci / module boundaries / boundaries (push) Canceled after 0s
ci / contract / contract (сгенерированный код совпадает с openapi.yaml) (push) Canceled after 11m29s
ci / db / db (push) Canceled after 11m22s
ci / mobile / mobile (Metro-бандл Android) (push) Canceled after 6m43s
ci / recommender / recommender (push) Canceled after 6m47s
ci / ts / ts (packages + web) (push) Canceled after 1s
ci / api / api (push) Canceled after 0s
ci / module boundaries / boundaries (push) Canceled after 0s
ci / contract / contract (сгенерированный код совпадает с openapi.yaml) (push) Canceled after 11m29s
ci / db / db (push) Canceled after 11m22s
ci / mobile / mobile (Metro-бандл Android) (push) Canceled after 6m43s
ci / recommender / recommender (push) Canceled after 6m47s
ci / ts / ts (packages + web) (push) Canceled after 1s
This commit is contained in:
1 parent
0a05bfe2cd
commit
11a16cd023
59 files changed
+5022
-542
No files matched your search
@@ -0,0 +1,20 @@
|
||||
-- +goose Up
|
||||
ALTER TABLE direct_messages ADD COLUMN reply_to uuid REFERENCES direct_messages(id) ON DELETE SET NULL,
|
||||
ADD COLUMN edited_at timestamptz, ADD COLUMN deleted_at timestamptz;
|
||||
CREATE TABLE message_reactions (
|
||||
message_id uuid NOT NULL REFERENCES direct_messages(id) ON DELETE CASCADE,
|
||||
user_id uuid NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
emoji text NOT NULL CHECK(emoji IN ('❤️','👍','🔥','😂','🎵','👏')),
|
||||
PRIMARY KEY(message_id,user_id,emoji)
|
||||
);
|
||||
CREATE TABLE chat_typing (
|
||||
user_id uuid NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
peer_id uuid NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
expires_at timestamptz NOT NULL,
|
||||
PRIMARY KEY(user_id,peer_id), CHECK(user_id<>peer_id)
|
||||
);
|
||||
|
||||
-- +goose Down
|
||||
DROP TABLE chat_typing;
|
||||
DROP TABLE message_reactions;
|
||||
ALTER TABLE direct_messages DROP COLUMN reply_to, DROP COLUMN edited_at, DROP COLUMN deleted_at;
|
||||
Reference in new issue
Block a user