ALTER TABLE entry ADD COLUMN pointed BOOLEAN NOT NULL DEFAULT false;

UPDATE entry SET pointed = operation_date IS NOT NULL;

UPDATE entry SET operation_date = value_date;

ALTER TABLE entry DROP COLUMN value_date;

CREATE INDEX entry_operation_date_idx ON entry USING btree (operation_date);

