no crashes
This commit is contained in:
Aaron Kimbre
2023-11-21 14:16:56 -06:00
parent e5f62e870b
commit a4bf11502f
17 changed files with 286 additions and 94 deletions

View File

@@ -4,13 +4,13 @@ CREATE TABLE IF NOT EXISTS guilds (
owner_id BIGINT NOT NULL REFERENCES charinfo(id) ON DELETE CASCADE,
motd TEXT,
reputation INT NOT NULL DEFAULT 0,
created BIGINT UNSIGNED NOT NULL DEFAULT 0
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP()
);
CREATE TABLE IF NOT EXISTS guild_members (
guild_id BIGINT NOT NULL REFERENCES guilds(id) ON DELETE CASCADE,
character_id BIGINT NOT NULL REFERENCES charinfo(id) ON DELETE CASCADE,
rank INT NOT NULL DEFAULT 4,
joined BIGINT UNSIGNED NOT NULL DEFAULT 0
joined TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP(),
PRIMARY KEY (guild_id, character_id)
);