19 lines
541 B
SQL
19 lines
541 B
SQL
-- Your SQL goes here
|
|
CREATE TABLE guild (
|
|
guild_id BIGINT PRIMARY KEY NOT NULL,
|
|
channel_id BIGINT NOT NULL
|
|
);
|
|
|
|
CREATE TABLE user (
|
|
discord_id TEXT PRIMARY KEY NOT NULL,
|
|
server BIGINT,
|
|
fake_id BIGINT NOT NULL,
|
|
image_idx INT NOT NULL,
|
|
when_generated DATETIME default CURRENT_TIMESTAMP NOT NULL,
|
|
should_notify TINYINT NOT NULL DEFAULT 1,
|
|
is_guild_admin TINYINT NOT NULL DEFAULT 0,
|
|
is_banned TINYINT NOT NULL DEFAULT 0,
|
|
suspend_expires DATETIME,
|
|
FOREIGN KEY(server) REFERENCES guild(guild_id)
|
|
);
|