-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgenerate.sql
More file actions
19 lines (14 loc) · 1.22 KB
/
generate.sql
File metadata and controls
19 lines (14 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
CREATE DATABASE p2pooltip;
USE p2pooltip;
CREATE TABLE IF NOT EXISTS `tips` (
`id` BIGINT NOT NULL AUTO_INCREMENT, -- index
`commentid` VARCHAR(10) NOT NULL, -- Reddit comment id of tip
`messageid` VARCHAR(10) NOT NULL, -- Reddit message id of Changetip message
`amount` BIGINT NOT NULL, -- original tip amount, in satoshis
`sent` BIGINT NOT NULL, -- final tip amount after fees, in satoshis
`username` VARCHAR(20) NOT NULL, -- Reddit username of tipper
`time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -- timestamp
`txid` VARCHAR(64) NOT NULL, -- Bitcoin transaction id
PRIMARY KEY (`id`),
KEY `commentid` (`commentid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;