-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb_create.sql
More file actions
30 lines (30 loc) · 1.22 KB
/
db_create.sql
File metadata and controls
30 lines (30 loc) · 1.22 KB
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
DROP DATABASE IF EXISTS quickquestions;
CREATE DATABASE quickquestions;
USE quickquestions;
CREATE TABLE tr_groups(
ID INT PRIMARY KEY AUTO_INCREMENT,
serverId VARCHAR(18) NOT NULL,
name VARCHAR(255) NOT NULL,
added TIMESTAMP(1) NOT NULL DEFAULT CURRENT_TIMESTAMP(1)
);
CREATE TABLE triggersresponses(
ID INT PRIMARY KEY AUTO_INCREMENT,
groupFK INT NOT NULL,
value TEXT NOT NULL,
type ENUM('trigger', 'response') NOT NULL,
added TIMESTAMP(1) NOT NULL DEFAULT CURRENT_TIMESTAMP(1),
FOREIGN KEY (groupFK) REFERENCES tr_groups(ID)
);
-- -------------------------------------------------
INSERT INTO tr_groups (serverId, name) VALUES ('897499735970152559', 'Applications');
INSERT INTO triggersresponses (groupFK, value, type) VALUES (1, 'Mods', 'trigger'),
(1, 'mod applications', 'trigger'),
(1, 'apps open?', 'trigger'),
(1, 'when will the alskdja open?', 'trigger'),
(1, 'alkdsjalsd', 'trigger'),
(1, 'They will open soon.', 'response'),
(1, 'Have patience', 'response'),
(1, 'Please stop asking.', 'response');
INSERT INTO tr_groups (serverId, name) VALUES ('897499735970152559', 'new users');
INSERT INTO triggersresponses (groupFK, value, type) VALUES (2, "hey I\'m new", 'trigger'),
(2, "Hey there new user!", 'response');