8 lines
278 B
MySQL
8 lines
278 B
MySQL
|
BEGIN;
|
||
|
ALTER TABLE word_form_example_texts ALTER COLUMN pos SET NOT NULL;
|
||
|
ALTER TABLE word_form_example_texts ADD CONSTRAINT pos_is_not_negative
|
||
|
CHECK (pos >= 0);
|
||
|
CREATE UNIQUE INDEX word_form_example_texts_pos
|
||
|
ON word_form_example_texts (example_text_id, pos);
|
||
|
COMMIT;
|