Remove column parts.english_name
This commit is contained in:
parent
1c84d9deb4
commit
7369489b7a
2 changed files with 10 additions and 0 deletions
7
20230218104748_remove_part_english_names.down.sql
Normal file
7
20230218104748_remove_part_english_names.down.sql
Normal 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;
|
3
20230218104748_remove_part_english_names.up.sql
Normal file
3
20230218104748_remove_part_english_names.up.sql
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
BEGIN;
|
||||||
|
ALTER TABLE parts DROP COLUMN english_name;
|
||||||
|
COMMIT;
|
Loading…
Reference in a new issue