maubot-kickbot/kickbot/db.py

16 lines
468 B
Python
Raw Normal View History

from __future__ import annotations
from mautrix.util.async_db import UpgradeTable, Connection
upgrade_table = UpgradeTable()
@upgrade_table.register(description="Table initialization")
async def upgrade_v1(conn: Connection) -> None:
await conn.execute(
"""CREATE TABLE user_events (
mxid TEXT PRIMARY KEY,
2022-06-20 08:49:41 +00:00
last_message_timestamp BIGINT NOT NULL,
ignore_inactivity INT DEFAULT 0
)"""
)