From 73b0f0c6b2c74c38c5312479d38fa1f44091b3a1 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Wed, 30 Dec 2020 23:16:13 -0500 Subject: fix the members table --- discord/store.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'discord/store.cpp') diff --git a/discord/store.cpp b/discord/store.cpp index ef23eca..07e6a32 100644 --- a/discord/store.cpp +++ b/discord/store.cpp @@ -692,14 +692,15 @@ bool Store::CreateTables() { constexpr const char *create_members = R"( CREATE TABLE IF NOT EXISTS members ( - user_id INTEGER PRIMARY KEY, + user_id INTEGER NOT NULL, guild_id INTEGER NOT NULL, nickname TEXT, roles TEXT NOT NULL, /* json */ joined_at TEXT NOT NULL, premium_since TEXT, deaf BOOL NOT NULL, - mute BOOL NOT NULL + mute BOOL NOT NULL, + PRIMARY KEY(user_id, guild_id) ) )"; -- cgit v1.2.3