forked from xinchejian/bouncer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb.sql
30 lines (27 loc) · 803 Bytes
/
db.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
CREATE DATABASE `members`;
USE `members`;
CREATE TABLE `Payments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email` char(64) NOT NULL,
`submitted` datetime NOT NULL,
`amount` int(11) NOT NULL,
`verified` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `IDX_Payments_EMAIL` (`email`)
);
CREATE TABLE `Users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email` char(64) NOT NULL,
`password` char(32) NOT NULL,
`salt` char(32) NOT NULL,
`last_update` timestamp NOT NULL,
`paid_verified` date DEFAULT NULL,
`paid` date DEFAULT NULL,
`since` date NOT NULL,
`count` int(11) NOT NULL DEFAULT '0',
`mac` char(40) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `IDX_Users_EMAIL` (`email`),
UNIQUE KEY `IDX_Users_PASSWORD` (`password`),
UNIQUE KEY `IDX_Users_MAC` (`mac`)
);