feat: sync message translation support

This commit is contained in:
A 2026-07-12 14:20:26 +08:00
parent cbccd6a8d9
commit ea6cc72886
26 changed files with 1189 additions and 0 deletions

View file

@ -0,0 +1 @@
DROP TABLE IF EXISTS peer_translation_settings;

View 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);