fix on fix

This commit is contained in:
2026-05-07 22:59:09 +03:00
parent 74b51e74ca
commit ae0322facb
2 changed files with 20 additions and 1 deletions

8
db.py
View File

@@ -356,10 +356,18 @@ def init_db():
except Exception:
pass
# Migration: add source column to culture_log (added in v4.3)
# Safe to run repeatedly — silently skipped if column already exists.
try:
c.execute("ALTER TABLE culture_log ADD COLUMN source TEXT NOT NULL DEFAULT 'manual'")
except Exception:
pass # column already exists
conn.commit()
conn.close()
def generate_clan_key():
"""Generate a short, unique, human-readable clan key."""
return secrets.token_urlsafe(8).upper()[:10]