merge order_id migration into the table create sql

This commit is contained in:
c9s 2022-03-11 13:25:51 +08:00
parent c78fa09f4d
commit 98f5416661
2 changed files with 3 additions and 4 deletions

View File

@ -4,6 +4,7 @@ CREATE TABLE `trades`
`gid` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`id` BIGINT UNSIGNED,
`order_id` BIGINT UNSIGNED NOT NULL,
`exchange` VARCHAR(24) NOT NULL DEFAULT '',
`symbol` VARCHAR(8) NOT NULL,
`price` DECIMAL(16, 8) UNSIGNED NOT NULL,

View File

@ -1,7 +1,5 @@
-- +up
ALTER TABLE `trades`
ADD COLUMN `order_id` BIGINT UNSIGNED NOT NULL;
SELECT 1;
-- +down
ALTER TABLE `trades`
DROP COLUMN `order_id`;
SELECT 1;