ALTER TABLE social.feedback_task DROP CONSTRAINT type_constraint;

ALTER TABLE social.feedback_task ADD CONSTRAINT type_constraint
    CHECK (type = ANY (ARRAY[
        'absent-object'::text,
        'imperfect-route'::text,
        'other'::text,
        'remove'::text,
        'route-lost'::text,
        'wrong-address'::text,
        'wrong-entrance'::text,
        'wrong-name'::text,
        'wrong-parking'::text,
        'wrong-pedestrian-route'::text,
        'wrong-position'::text,
        'wrong-road-direction'::text,
        'wrong-route-time'::text,
        'wrong-speed-limit'::text,
        'mandatory-direction-traffic-sign'::text,
        'prohibited-turn-sign'::text,
        'one-way-traffic-sign'::text,
        'traffic-lane-sign'::text,
        'traffic-prohibited-sign'::text,
        'traffic-circle-sign'::text,
        'road-closure'::text,
        'poi'::text,

        'road'::text,
        'street-name'::text,
        'road-speed-limit'::text,
        'road-direction'::text,
        'road-surface'::text,
        'route-gap'::text,
        'route-lost'::text,
        'car-route'::text,
        'pedestrian-route'::text,
        'bicycle-route'::text,
        'building'::text,
        'address'::text,
        'entrance'::text,
        'parking'::text,
        'maneuver'::text,
        'barrier'::text,
        'road-closure'::text,
        'road-annotation'::text,
        'other'::text,
        'mandatory-direction-traffic-sign'::text,
        'prohibited-turn-sign'::text,
        'one-way-traffic-sign'::text,
        'traffic-lane-sign'::text,
        'traffic-prohibited-sign'::text,
        'traffic-circle-sign'::text,
        'poi'::text
    ]));
