1
0
Fork 0

Remove column parts.english_name

This commit is contained in:
Alex Kotov 2023-02-18 14:52:28 +04:00
parent 1c84d9deb4
commit 7369489b7a
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1,7 @@
BEGIN;
ALTER TABLE parts ADD COLUMN english_name VARCHAR;
ALTER TABLE parts ADD CONSTRAINT english_name_is_sane_text
CHECK (english_name IS NULL OR is_sane_text(english_name));
CREATE UNIQUE INDEX parts_language_english_name
ON parts (language_id, english_name);
COMMIT;

View file

@ -0,0 +1,3 @@
BEGIN;
ALTER TABLE parts DROP COLUMN english_name;
COMMIT;