Skip to content

Commit 37b1d39

Browse files
committed
add funding_fees table migrations
1 parent ed0f40e commit 37b1d39

2 files changed

Lines changed: 62 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
-- +up
2+
-- +begin
3+
CREATE TABLE `funding_fees`
4+
(
5+
`gid` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
6+
7+
-- transaction id
8+
`txn_id` BIGINT UNSIGNED NOT NULL,
9+
10+
-- for exchange
11+
`exchange` VARCHAR(24) NOT NULL DEFAULT '',
12+
13+
-- asset name, BTC, MAX, USDT ... etc
14+
`asset` VARCHAR(5) NOT NULL,
15+
16+
-- the amount of the funding fee
17+
`amount` DECIMAL(16, 8) NOT NULL,
18+
19+
`funded_at` DATETIME NOT NULL,
20+
21+
PRIMARY KEY (`gid`),
22+
23+
UNIQUE KEY `txn_id` (`txn_id`, `exchange`)
24+
);
25+
-- +end
26+
27+
-- +down
28+
29+
-- +begin
30+
DROP TABLE `funding_fees`;
31+
-- +end
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
-- +up
2+
-- +begin
3+
CREATE TABLE `funding_fees`
4+
(
5+
`gid` INTEGER PRIMARY KEY AUTOINCREMENT,
6+
7+
-- transaction id
8+
`txn_id` INTEGER NOT NULL,
9+
10+
-- for exchange
11+
`exchange` VARCHAR(24) NOT NULL DEFAULT '',
12+
13+
-- asset name, BTC, MAX, USDT ... etc
14+
`asset` VARCHAR(5) NOT NULL,
15+
16+
-- the amount of the funding fee
17+
`amount` DECIMAL(16, 8) NOT NULL,
18+
19+
`funded_at` DATETIME NOT NULL,
20+
21+
PRIMARY KEY (`gid`),
22+
23+
UNIQUE KEY `txn_id` (`txn_id`, `exchange`)
24+
);
25+
-- +end
26+
27+
-- +down
28+
29+
-- +begin
30+
DROP TABLE `funding_fees`;
31+
-- +end

0 commit comments

Comments
 (0)