bbgo_origin/migrations/mysql/20240531163411_trades_created.sql

15 lines
282 B
MySQL
Raw Normal View History

-- +up
-- +begin
ALTER TABLE `trades` ADD COLUMN `inserted_at` DATETIME(3) DEFAULT CURRENT_TIMESTAMP NOT NULL AFTER `traded_at`;
-- +end
-- +begin
UPDATE `trades` SET `inserted_at` = `traded_at`;
-- +end
-- +down
-- +begin
ALTER TABLE `trades` DROP COLUMN `inserted_at`;
-- +end