Phase 3.1: Enhanced Chore Logging and Reporting System

This commit is contained in:
2026-02-05 12:33:51 +11:00
commit e3cae7bfbb
178 changed files with 30105 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
"""Add discord_id and profile_picture to users table."""
import sqlite3
from pathlib import Path
def migrate():
"""Add new columns to users table."""
db_path = Path("/app/data/familyhub.db")
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
try:
# Add discord_id column
cursor.execute("ALTER TABLE users ADD COLUMN discord_id VARCHAR(100)")
print("✓ Added discord_id column")
except sqlite3.OperationalError as e:
if "duplicate column name" in str(e):
print("✓ discord_id column already exists")
else:
raise
try:
# Add profile_picture column
cursor.execute("ALTER TABLE users ADD COLUMN profile_picture VARCHAR(500)")
print("✓ Added profile_picture column")
except sqlite3.OperationalError as e:
if "duplicate column name" in str(e):
print("✓ profile_picture column already exists")
else:
raise
conn.commit()
conn.close()
print("✓ Migration complete!")
if __name__ == "__main__":
migrate()