2021-03-14 02:58:26 +00:00
|
|
|
-- +up
|
|
|
|
-- +begin
|
|
|
|
CREATE TABLE `deposits`
|
|
|
|
(
|
|
|
|
`gid` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
|
|
`exchange` VARCHAR(24) NOT NULL,
|
|
|
|
|
|
|
|
-- asset is the asset name (currency)
|
|
|
|
`asset` VARCHAR(10) NOT NULL,
|
|
|
|
|
2021-03-14 02:42:39 +00:00
|
|
|
`address` VARCHAR(128) NOT NULL DEFAULT '',
|
2021-03-14 02:58:26 +00:00
|
|
|
`amount` DECIMAL(16, 8) NOT NULL,
|
2021-03-14 02:42:39 +00:00
|
|
|
`txn_id` VARCHAR(256) NOT NULL,
|
2021-03-14 02:58:26 +00:00
|
|
|
`time` DATETIME(3) NOT NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY (`gid`),
|
|
|
|
UNIQUE KEY `txn_id` (`exchange`, `txn_id`)
|
|
|
|
);
|
|
|
|
-- +end
|
|
|
|
|
|
|
|
|
|
|
|
-- +down
|
|
|
|
|
|
|
|
-- +begin
|
|
|
|
DROP TABLE IF EXISTS `deposits`;
|
|
|
|
-- +end
|