This repository has been archived by the owner on Dec 28, 2017. It is now read-only.
forked from IANetworks/Ducky-Mc-Duckerson
-
Notifications
You must be signed in to change notification settings - Fork 0
/
duckyDB_Rev2.sql
71 lines (64 loc) · 1.78 KB
/
duckyDB_Rev2.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
PRAGMA auto_vacuum = 2; -- INCREMENTAL
PRAGMA secure_delete = on;
PRAGMA foreign_keys = off;
-- Table: variables
DROP TABLE IF EXISTS variables;
CREATE TABLE `variables` (
`guild_id` INTEGER NOT NULL UNIQUE,
`logging_on` INTEGER NOT NULL DEFAULT 0,
`logging_channel` TEXT,
`prefix` TEXT DEFAULT '!',
`greet_on` INTEGER NOT NULL DEFAULT 0,
`greeting_msg` TEXT,
`greeting_channel` TEXT,
PRIMARY KEY(`guild_id`)
);
-- Table: user_profile
DROP TABLE IF EXISTS user_profile;
CREATE TABLE `user_profile` (
`user_id` INTEGER NOT NULL,
`guild_id` INTEGER NOT NULL,
`balance` INTEGER NOT NULL DEFAULT 0,
`points` INTEGER NOT NULL DEFAULT 0,
`rank` INTEGER NOT NULL DEFAULT 0,
`flipped` INTEGER NOT NULL DEFAULT 0,
`unflipped` INTEGER NOT NULL DEFAULT 0,
`level` INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY(`user_id`,`guild_id`)
);
-- Table: self_roles
DROP TABLE IF EXISTS self_roles;
CREATE TABLE `self_roles` (
`role_id` INTEGER NOT NULL,
`guild_id` INTEGER NOT NULL,
`role_group_id` INTEGER NOT NULL,
`exclusive_on` INTEGER DEFAULT 0,
PRIMARY KEY(`role_id`)
);
-- Table: permission_level
DROP TABLE IF EXISTS permission_level;
CREATE TABLE `permission_level` (
`level_id` INTEGER NOT NULL,
`guild_id` INTEGER NOT NULL,
`level_name` TEXT NOT NULL,
PRIMARY KEY(`level_id`)
);
-- Table: permission_group
DROP TABLE IF EXISTS permission_group;
CREATE TABLE `permission_group` (
`id` INTEGER NOT NULL,
`guild_id` INTEGER NOT NULL,
`level_id` INTEGER NOT NULL,
`user_role_id` INTEGER NOT NULL,
`is_user` INTEGER NOT NULL,
PRIMARY KEY(`id`)
);
-- Table: permission_commands
DROP TABLE IF EXISTS permission_commands;
CREATE TABLE `permission_commands` (
`command_id` INTEGER NOT NULL,
`guild_id` INTEGER NOT NULL,
`level_id` INTEGER NOT NULL,
PRIMARY KEY(`command_id`)
);
PRAGMA foreign_keys = on;