2020-12-31 09:07:12 +00:00
|
|
|
-- +up
|
2021-01-15 02:31:37 +00:00
|
|
|
CREATE TABLE `trades`
|
|
|
|
(
|
|
|
|
`gid` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
2020-10-05 09:51:01 +00:00
|
|
|
|
2021-01-15 02:31:37 +00:00
|
|
|
`id` BIGINT UNSIGNED,
|
|
|
|
`exchange` VARCHAR(24) NOT NULL DEFAULT '',
|
|
|
|
`symbol` VARCHAR(8) NOT NULL,
|
|
|
|
`price` DECIMAL(16, 8) UNSIGNED NOT NULL,
|
|
|
|
`quantity` DECIMAL(16, 8) UNSIGNED NOT NULL,
|
|
|
|
`quote_quantity` DECIMAL(16, 8) UNSIGNED NOT NULL,
|
|
|
|
`fee` DECIMAL(16, 8) UNSIGNED NOT NULL,
|
|
|
|
`fee_currency` VARCHAR(4) NOT NULL,
|
|
|
|
`is_buyer` BOOLEAN NOT NULL DEFAULT FALSE,
|
|
|
|
`is_maker` BOOLEAN NOT NULL DEFAULT FALSE,
|
|
|
|
`side` VARCHAR(4) NOT NULL DEFAULT '',
|
|
|
|
`traded_at` DATETIME(3) NOT NULL,
|
2020-10-05 09:51:01 +00:00
|
|
|
|
2021-01-15 02:31:37 +00:00
|
|
|
PRIMARY KEY (`gid`),
|
|
|
|
UNIQUE KEY `id` (`id`)
|
|
|
|
);
|
2021-02-05 06:15:28 +00:00
|
|
|
|
2021-01-15 02:31:37 +00:00
|
|
|
-- +down
|
2021-02-05 06:15:28 +00:00
|
|
|
DROP TABLE IF EXISTS `trades`;
|