diff --git a/uqcsbot/advent.py b/uqcsbot/advent.py index f0e4385..da5759e 100644 --- a/uqcsbot/advent.py +++ b/uqcsbot/advent.py @@ -603,7 +603,7 @@ async def register_command(self, interaction: discord.Interaction, aoc_name: str ) return - db_session.add(AOCRegistrations(aoc_userid=AOC_id, discord_userid=discord_id)) + db_session.add(AOCRegistrations(aoc_userid=AOC_id, discord_userid=discord_id, year=2024)) # this is a quick fix unitl we drop the column in the database db_session.commit() db_session.close() @@ -674,7 +674,7 @@ async def register_admin_command( ) return - db_session.add(AOCRegistrations(aoc_userid=aoc_id, discord_userid=discord_id)) + db_session.add(AOCRegistrations(aoc_userid=aoc_id, discord_userid=discord_id, year=2024)) # this is a quick fix unitl we drop the column in the database db_session.commit() db_session.close() diff --git a/uqcsbot/models.py b/uqcsbot/models.py index f117a9b..6211f7a 100644 --- a/uqcsbot/models.py +++ b/uqcsbot/models.py @@ -34,7 +34,7 @@ class AOCRegistrations(Base): "discord_userid", BigInteger, primary_key=True, nullable=False ) aoc_userid: Mapped[int] = mapped_column("aoc_userid", Integer, nullable=False) - + year: Mapped[int] = mapped_column("year", Integer, nullable=False) # Try to remove this column from the database at some point class MCWhitelist(Base): __tablename__ = "mc_whitelisted"