ALTER TABLE eye.detection_group DROP COLUMN type CASCADE;
ALTER TABLE eye.detection_group ALTER COLUMN type_ SET NOT NULL;
ALTER TABLE eye.detection_group RENAME COLUMN type_ TO type;

-- create new index
CREATE UNIQUE INDEX detection_group_unique_index ON eye.detection_group USING btree(frame_id, type);
-- There is no situations to use eye.detection_group_type_index index
