Use more unique logger and remove redundant NOT NULL

This commit is contained in:
Tulir Asokan 2022-03-27 20:30:09 +03:00
parent e9e325a871
commit 7532f4523a
2 changed files with 3 additions and 4 deletions

View file

@ -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,
)

View file

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