ALTER TABLE sys_menus
    DROP CONSTRAINT IF EXISTS sys_menus_path_required_check;

DROP INDEX IF EXISTS sys_menus_path_unique_idx;

ALTER TABLE sys_menus
    ADD CONSTRAINT sys_menus_path_key UNIQUE (path);

ALTER TABLE sys_menus
    ALTER COLUMN path SET NOT NULL;