From acc017d61ced91eb74cf5dcc2f04fa98065fc576 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 28 Dec 2023 05:29:47 -0500 Subject: [PATCH] fix(aurora): fixed index creation --- aurora/utilities/database.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aurora/utilities/database.py b/aurora/utilities/database.py index 0c4c1f0..c501c2f 100644 --- a/aurora/utilities/database.py +++ b/aurora/utilities/database.py @@ -56,13 +56,13 @@ async def create_guild_table(guild: Guild): """ cursor.execute(query) - index_query_1 = f"CREATE INDEX idx_target_id ON moderation_{guild.id}(target_id);" + index_query_1 = f"CREATE INDEX IF NOT EXISTS idx_target_id ON moderation_{guild.id}(target_id);" cursor.execute(index_query_1) - index_query_2 = f"CREATE INDEX idx_moderator_id ON moderation_{guild.id}(moderator_id);" + index_query_2 = f"CREATE INDEX IF NOT EXISTS idx_moderator_id ON moderation_{guild.id}(moderator_id);" cursor.execute(index_query_2) - index_query_3 = f"CREATE INDEX idx_moderation_id ON moderation_{guild.id}(moderation_id);" + index_query_3 = f"CREATE INDEX IF NOT EXISTS idx_moderation_id ON moderation_{guild.id}(moderation_id);" cursor.execute(index_query_3) insert_query = f"""