add default 0 to not null field

This commit is contained in:
c9s 2021-02-06 09:15:03 +08:00
parent 483f6270f4
commit 256fce484c

View File

@ -1,5 +1,5 @@
-- +up
ALTER TABLE `trades` ADD COLUMN `order_id` INTEGER NOT NULL;
ALTER TABLE `trades` ADD COLUMN `order_id` INTEGER NOT NULL DEFATUL 0;
-- +down
ALTER TABLE `trades` RENAME COLUMN `order_id` TO `order_id_deleted`;