2021-02-23 01:23:02 +00:00
|
|
|
-- +up
|
|
|
|
CREATE TABLE `rewards`
|
|
|
|
(
|
2021-02-23 01:37:06 +00:00
|
|
|
`gid` INTEGER PRIMARY KEY AUTOINCREMENT,
|
2021-02-23 01:23:02 +00:00
|
|
|
|
|
|
|
-- for exchange
|
2021-02-23 01:37:06 +00:00
|
|
|
`exchange` VARCHAR(24) NOT NULL DEFAULT '',
|
2021-02-23 01:23:02 +00:00
|
|
|
|
|
|
|
-- reward record id
|
2021-02-23 01:37:06 +00:00
|
|
|
`uuid` VARCHAR(32) NOT NULL,
|
|
|
|
`reward_type` VARCHAR(24) NOT NULL DEFAULT '',
|
2021-02-23 01:23:02 +00:00
|
|
|
|
|
|
|
-- currency symbol, BTC, MAX, USDT ... etc
|
2021-02-23 01:37:06 +00:00
|
|
|
`currency` VARCHAR(5) NOT NULL,
|
2021-02-23 01:23:02 +00:00
|
|
|
|
|
|
|
-- the quantity of the rewards
|
2021-02-23 01:37:06 +00:00
|
|
|
`quantity` DECIMAL(16, 8) NOT NULL,
|
2021-02-23 01:23:02 +00:00
|
|
|
|
2021-02-23 01:37:06 +00:00
|
|
|
`state` VARCHAR(5) NOT NULL,
|
2021-02-23 01:23:02 +00:00
|
|
|
|
2021-02-23 01:37:06 +00:00
|
|
|
`created_at` DATETIME NOT NULL,
|
2021-02-23 01:23:02 +00:00
|
|
|
|
2021-02-23 08:39:48 +00:00
|
|
|
`spent` BOOLEAN NOT NULL DEFAULT FALSE,
|
2021-02-23 01:23:02 +00:00
|
|
|
|
2021-02-23 01:37:06 +00:00
|
|
|
`note` TEXT NULL
|
2021-02-23 01:23:02 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
-- +down
|
|
|
|
DROP TABLE IF EXISTS `rewards`;
|