-
Notifications
You must be signed in to change notification settings - Fork 11
/
schema.sql
32 lines (28 loc) · 876 Bytes
/
schema.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
30
31
32
CREATE DATABASE spbot_db;
USE spbot_db;
CREATE TABLE mutedusers (
id INT NOT NULL AUTO_INCREMENT,
user_id VARCHAR(32) UNIQUE NOT NULL,
lastupdated TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
muted BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY (id)
);
CREATE TABLE serverlanguage (
id INT NOT NULL AUTO_INCREMENT,
server_id VARCHAR(32) UNIQUE NOT NULL,
language VARCHAR(2) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE dmmutedusers (
id INT NOT NULL AUTO_INCREMENT,
user_id VARCHAR(32) UNIQUE NOT NULL,
lastupdated TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
muted BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY (id)
);
CREATE TABLE dmtimes (
user_id VARCHAR(32) UNIQUE NOT NULL,
lastupdated TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
lastdm BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (user_id)
);