fix guild creation

This commit is contained in:
Aaron Kimbre
2022-12-20 08:54:52 -06:00
parent 30fbdd3956
commit c4ae05ecee
3 changed files with 21 additions and 7 deletions

View File

@@ -1,15 +1,15 @@
CREATE TABLE IF NOT EXISTS guilds (
id BIGINT NOT NULL PRIMARY KEY,
id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(35) NOT NULL,
owner BIGINT NOT NULL REFERENCES charinfo(id),
owner_id BIGINT NOT NULL REFERENCES charinfo(id) ON DELETE CASCADE,
motd TEXT,
uscore INT NOT NULL DEFAULT 0,
created BIGINT UNSIGNED NOT NULL DEFAULT 0
);
CREATE TABLE IF NOT EXISTS guild_members (
guild_id BIGINT NOT NULL REFERENCES guilds(id),
character_id BIGINT NOT NULL REFERENCES charinfo(id),
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
);