diff --git a/maubot/standalone/__main__.py b/maubot/standalone/__main__.py index c799fcf..40a218d 100644 --- a/maubot/standalone/__main__.py +++ b/maubot/standalone/__main__.py @@ -123,7 +123,7 @@ db = Database.create( config["database"], db_args=config.get("database_opts", {}), ignore_foreign_tables=True, - log=logging.getLogger("maubot.db"), + log=logging.getLogger("maubot.db.standalone.upgrade"), upgrade_table=upgrade_table, ) diff --git a/maubot/standalone/database.py b/maubot/standalone/database.py index 117634b..f09906d 100644 --- a/maubot/standalone/database.py +++ b/maubot/standalone/database.py @@ -32,10 +32,9 @@ upgrade_table = UpgradeTable( async def upgrade_v1(conn: Connection) -> None: await conn.execute( """CREATE TABLE IF NOT EXISTS standalone_next_batch ( - user_id TEXT NOT NULL, + user_id TEXT PRIMARY KEY, next_batch TEXT, - filter_id TEXT, - PRIMARY KEY (user_id) + filter_id TEXT )""" )