2022-05-30 18:01:54 +00:00
|
|
|
-- +up
|
|
|
|
CREATE TABLE `margin_liquidations`
|
|
|
|
(
|
|
|
|
`gid` INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
|
|
2022-05-31 09:08:52 +00:00
|
|
|
`exchange` VARCHAR(24) NOT NULL DEFAULT '',
|
2022-05-30 18:01:54 +00:00
|
|
|
|
2022-05-31 09:08:52 +00:00
|
|
|
`symbol` VARCHAR(24) NOT NULL DEFAULT '',
|
2022-05-30 18:01:54 +00:00
|
|
|
|
2022-05-31 09:08:52 +00:00
|
|
|
`order_id` INTEGER NOT NULL,
|
2022-05-30 18:01:54 +00:00
|
|
|
|
2022-05-31 09:08:52 +00:00
|
|
|
`is_isolated` BOOL NOT NULL DEFAULT false,
|
2022-05-30 18:01:54 +00:00
|
|
|
|
|
|
|
`average_price` DECIMAL(16, 8) NOT NULL,
|
|
|
|
|
|
|
|
`price` DECIMAL(16, 8) NOT NULL,
|
|
|
|
|
|
|
|
`quantity` DECIMAL(16, 8) NOT NULL,
|
|
|
|
|
|
|
|
`executed_quantity` DECIMAL(16, 8) NOT NULL,
|
|
|
|
|
2022-05-31 09:08:52 +00:00
|
|
|
`side` VARCHAR(5) NOT NULL DEFAULT '',
|
2022-05-30 18:01:54 +00:00
|
|
|
|
2022-05-31 09:08:52 +00:00
|
|
|
`time_in_force` VARCHAR(5) NOT NULL DEFAULT '',
|
2022-05-30 18:01:54 +00:00
|
|
|
|
2022-05-31 09:08:52 +00:00
|
|
|
`time` DATETIME(3) NOT NULL
|
2022-05-30 18:01:54 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
-- +down
|
|
|
|
DROP TABLE IF EXISTS `margin_liquidations`;
|