bbgo_origin/migrations/mysql/20210118163847_fix_unique_index.sql

16 lines
296 B
MySQL
Raw Normal View History

-- +up
-- +begin
ALTER TABLE `trades` DROP INDEX `id`;
-- +end
-- +begin
2021-01-18 08:56:01 +00:00
ALTER TABLE `trades` ADD UNIQUE INDEX `id` (`exchange`,`symbol`, `side`, `id`);
-- +end
-- +down
-- +begin
ALTER TABLE `trades` DROP INDEX `id`;
-- +end
-- +begin
2021-01-18 08:56:01 +00:00
ALTER TABLE `trades` ADD UNIQUE INDEX `id` (`id`);
-- +end