-- Restores fixed CEFR list; fails if any row has cefr_level outside the old set or longer than 2 characters.
ALTER TABLE levels
    ALTER COLUMN cefr_level TYPE VARCHAR(2);

ALTER TABLE levels
    ADD CONSTRAINT levels_cefr_level_check
        CHECK (cefr_level IN ('A1', 'A2', 'A3', 'B1', 'B2', 'B3', 'C1', 'C2', 'C3'));
