fix(aurora): fixed index creation

This commit is contained in:
Seaswimmer 2023-12-28 05:29:47 -05:00
parent 558b056b9c
commit acc017d61c
Signed by untrusted user: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -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"""