1
0
Fork 0
database/20230218083503_translate.down.sql

16 lines
477 B
MySQL
Raw Normal View History

2023-02-18 04:06:34 -05:00
BEGIN;
DROP TABLE language_names;
ALTER TABLE languages ADD COLUMN english_name VARCHAR;
ALTER TABLE languages ADD COLUMN self_name VARCHAR;
ALTER TABLE languages ADD CONSTRAINT english_name_is_sane_text
CHECK (english_name IS NULL OR is_sane_text(english_name));
ALTER TABLE languages ADD CONSTRAINT self_name_is_sane_text
CHECK (self_name IS NULL OR is_sane_text(self_name));
CREATE UNIQUE INDEX languages_english_name ON languages (english_name);
COMMIT;