from backend.db import execute_commit

def migrate():
    print("Migrating orders table...")
    try:
        execute_commit("ALTER TABLE orders ADD COLUMN quantity INT DEFAULT 1")
    except Exception as e:
        print(f"Quantity column might already exist: {e}")
        
    try:
        execute_commit("ALTER TABLE orders ADD COLUMN notes TEXT")
    except Exception as e:
        print(f"Notes column might already exist: {e}")
    print("Migration complete!")

if __name__ == "__main__":
    migrate()
