CALORIE SYSTEM
This commit is contained in:
9
db.py
9
db.py
@@ -22,10 +22,19 @@ def init_db():
|
||||
rr INT DEFAULT 0,
|
||||
kills INT DEFAULT 0,
|
||||
deaths INT DEFAULT 0,
|
||||
calories_burned DECIMAL(10, 2) DEFAULT 0,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
)
|
||||
""")
|
||||
|
||||
# Add calories_burned column if it doesn't exist
|
||||
try:
|
||||
cur.execute("""
|
||||
ALTER TABLE users ADD COLUMN calories_burned DECIMAL(10, 2) DEFAULT 0
|
||||
""")
|
||||
except:
|
||||
pass # Column already exists
|
||||
|
||||
cur.execute("""
|
||||
CREATE TABLE IF NOT EXISTS workouts (
|
||||
discord_id VARCHAR(32),
|
||||
|
||||
Reference in New Issue
Block a user