ALTER TABLE social.feedback_task DROP COLUMN state_modified_at;
ALTER TABLE social.feedback_task ADD COLUMN state_modified_at timestamp with time zone NOT NULL DEFAULT now();

ALTER TABLE social.feedback_task DROP COLUMN history;
ALTER TABLE social.feedback_task ADD COLUMN history jsonb NOT NULL DEFAULT '[]'::jsonb;

CREATE INDEX feedback_task_outgoing_opened_state_modified_at_idx
    ON social.feedback_task_outgoing_opened USING btree (state_modified_at);

