1
0
Fork 0

Add column `translation_texts.commentary`

This commit is contained in:
Alex Kotov 2023-02-18 17:39:25 +04:00
parent 82fb7fa284
commit 9ae355f105
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 5 additions and 2 deletions

View File

@ -16,9 +16,12 @@ CREATE TABLE translation_texts (
translation_id BIGINT NOT NULL REFERENCES translations (id),
lang_id BIGINT NOT NULL REFERENCES languages (id),
value TEXT NOT NULL,
commentary TEXT,
-- CONSTRAINT name CHECK (condition)
CONSTRAINT value_is_sane_text CHECK (is_sane_text(value))
-- CONSTRAINT name CHECK (condition)
CONSTRAINT value_is_sane_text CHECK (is_sane_text(value)),
CONSTRAINT commentary_is_sane_text CHECK (commentary IS NULL OR
is_sane_text(commentary))
);
CREATE UNIQUE INDEX translations_word_index ON translations (word_id, index);