16 lines
477 B
MySQL
16 lines
477 B
MySQL
|
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;
|