dbvc icon indicating copy to clipboard operation
dbvc copied to clipboard

Rollback directory

Open jasny opened this issue 11 years ago • 0 comments

Add a rollback directory where users can optionally add a file that inverts an update. The name of the file in the rollback dir should be the same as in the update dir.

dev
  schema.sql
  updates
    add-status-to-foo.sql
  rollbacks
    add-status-to-foo.sql

dev/updates/add-status-to-foo.sql

ALTER TABLE `foo` ADD COLUMN `status` BOOL DEFAULT 1;

dev/updates/add-status-to-foo.sql

--- Rollback, removes status column
ALTER TABLE `foo` DROP COLUMN `status`;

jasny avatar Apr 28 '14 20:04 jasny