add is_futures column migration sql

This commit is contained in:
c9s 2021-12-05 16:23:54 +08:00
parent 874c7b39fa
commit 5cc9e74823
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,18 @@
-- +up
-- +begin
ALTER TABLE `trades` ADD COLUMN `is_futures` BOOLEAN NOT NULL DEFAULT FALSE;
-- +end
-- +begin
ALTER TABLE `orders` ADD COLUMN `is_futures` BOOLEAN NOT NULL DEFAULT FALSE;
-- +end
-- +down
-- +begin
ALTER TABLE `trades` DROP COLUMN `is_futures`;
-- +end
-- +begin
ALTER TABLE `orders` DROP COLUMN `is_futures`;
-- +end

View File

@ -0,0 +1,18 @@
-- +up
-- +begin
ALTER TABLE `trades` ADD COLUMN `is_futures` BOOLEAN NOT NULL DEFAULT FALSE;
-- +end
-- +begin
ALTER TABLE `orders` ADD COLUMN `is_futures` BOOLEAN NOT NULL DEFAULT FALSE;
-- +end
-- +down
-- +begin
ALTER TABLE `trades` RENAME COLUMN `is_futures` TO `is_futures_deleted`;
-- +end
-- +begin
ALTER TABLE `orders` RENAME COLUMN `is_futures` TO `is_futures_deleted`;
-- +end