Initial commit

This commit is contained in:
iulian 2025-12-26 00:52:56 +00:00
commit 983cee0320
322 changed files with 57174 additions and 0 deletions

View file

@ -0,0 +1,28 @@
"""
Migration: Add monthly_budget column to users table
Run this with: python migrations/add_monthly_budget.py
"""
from app import create_app, db
def migrate():
app = create_app()
with app.app_context():
try:
# Check if column exists
from sqlalchemy import inspect
inspector = inspect(db.engine)
columns = [col['name'] for col in inspector.get_columns('users')]
if 'monthly_budget' not in columns:
db.engine.execute('ALTER TABLE users ADD COLUMN monthly_budget FLOAT DEFAULT 0.0')
print("✅ Successfully added monthly_budget column to users table")
else:
print(" Column monthly_budget already exists")
except Exception as e:
print(f"❌ Migration failed: {e}")
raise
if __name__ == '__main__':
migrate()