update add modules
This commit is contained in:
10
db.py
10
db.py
@@ -55,6 +55,16 @@ def init_db():
|
||||
)
|
||||
''')
|
||||
|
||||
# Farm settings — per-player auto-farm configuration
|
||||
c.execute('''
|
||||
CREATE TABLE IF NOT EXISTS farm_settings (
|
||||
player_id TEXT PRIMARY KEY,
|
||||
enabled INTEGER NOT NULL DEFAULT 0,
|
||||
loot_option INTEGER NOT NULL DEFAULT 1, -- 1=5min, 2=20min, 3=90min, 4=4h
|
||||
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',
|
||||
|
||||
Reference in New Issue
Block a user