accountant-ui/src/sql/update/0.1-0.2/002_pointed.sql

11 lines
294 B
MySQL
Raw Normal View History

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);