fix on fix
This commit is contained in:
8
db.py
8
db.py
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user