2022-12-20 14:14:58 +00:00
|
|
|
CREATE TABLE IF NOT EXISTS guilds (
|
2022-12-20 14:54:52 +00:00
|
|
|
id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
2022-12-20 14:14:58 +00:00
|
|
|
name VARCHAR(35) NOT NULL,
|
2022-12-20 14:54:52 +00:00
|
|
|
owner_id BIGINT NOT NULL REFERENCES charinfo(id) ON DELETE CASCADE,
|
2022-12-20 14:14:58 +00:00
|
|
|
motd TEXT,
|
|
|
|
uscore INT NOT NULL DEFAULT 0,
|
|
|
|
created BIGINT UNSIGNED NOT NULL DEFAULT 0
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS guild_members (
|
2022-12-20 14:54:52 +00:00
|
|
|
guild_id BIGINT NOT NULL REFERENCES guilds(id) ON DELETE CASCADE,
|
|
|
|
character_id BIGINT NOT NULL REFERENCES charinfo(id) ON DELETE CASCADE,
|
2022-12-20 14:14:58 +00:00
|
|
|
rank INT NOT NULL DEFAULT 4,
|
|
|
|
joined BIGINT UNSIGNED NOT NULL DEFAULT 0
|
|
|
|
);
|