feat: sync message translation support
This commit is contained in:
parent
cbccd6a8d9
commit
ea6cc72886
26 changed files with 1189 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
DROP TABLE IF EXISTS peer_translation_settings;
|
||||
11
deploy/migrations/0083_peer_translation_settings.up.sql
Normal file
11
deploy/migrations/0083_peer_translation_settings.up.sql
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
CREATE TABLE peer_translation_settings (
|
||||
user_id bigint NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
peer_type text NOT NULL CHECK (peer_type IN ('user', 'channel')),
|
||||
peer_id bigint NOT NULL CHECK (peer_id > 0),
|
||||
disabled boolean NOT NULL DEFAULT true,
|
||||
updated_at timestamptz NOT NULL DEFAULT now(),
|
||||
PRIMARY KEY (user_id, peer_type, peer_id)
|
||||
);
|
||||
|
||||
CREATE INDEX peer_translation_settings_peer_idx
|
||||
ON peer_translation_settings (peer_type, peer_id, user_id);
|
||||
Loading…
Add table
Add a link
Reference in a new issue