from fastapi import APIRouter router = APIRouter() migrations = [ { "id": "001", "name": "initial_schema", "status": "completed", "timestamp": "2024-01-01T00:00:00Z" }, { "id": "002", "name": "add_user_table", "status": "completed", "timestamp": "2024-01-02T00:00:00Z" } ] @router.get("/whatsapp") async def get_migrations(): """Get database migration history""" return { "message": "Migration history retrieved", "migrations": migrations, "status": { "total": len(migrations), "completed": len([m for m in migrations if m["status"] == "completed"]) } }