make order id unique

This commit is contained in:
c9s 2020-11-05 12:55:20 +08:00
parent 8693bbbd24
commit 9f532be5a1

View File

@ -1,7 +1,7 @@
-- +goose Up
CREATE INDEX orders_symbol ON orders (exchange, symbol);
CREATE INDEX orders_id_symbol ON orders(exchange, order_id, symbol);
CREATE UNIQUE INDEX orders_order_id ON orders (order_id, exchange);
-- +goose Down
DROP INDEX orders_symbol ON orders;
DROP INDEX orders_id_symbol ON orders;
DROP INDEX orders_order_id ON orders;