captsa add alert

This commit is contained in:
2026-04-21 19:17:28 +03:00
parent 7e5bfcefa4
commit b0d933c1a0
9 changed files with 162 additions and 6 deletions

9
db.py
View File

@@ -46,6 +46,15 @@ def init_db():
)
''')
# Key-value store — generic flags (e.g. captcha_active)
c.execute('''
CREATE TABLE IF NOT EXISTS kv_store (
key TEXT PRIMARY KEY,
value TEXT,
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
)
''')
# Migration: add new columns if upgrading an existing database
for _col in [
'ALTER TABLE town_state ADD COLUMN player_id TEXT',