Kludex / fastapi-microservices

Fully Python async FastAPI project! 🚀
MIT License
441 stars 43 forks source link

Generate migration script #4

Closed Kludex closed 3 years ago

Kludex commented 3 years ago

I was able to create the first migration file via:

kubectl exec users-deployment-7d89d7b668-9kvxz -- alembic revision --autogenerate -m "First migration"
kubectl exec users-deployment-7d89d7b668-9kvxz -- cat /app/migrations/versions/dc304df8db88_first_migration.py >> dc304df8db88_first_migration.py 

Run this by hand is too primitive.

As a plus: decide what approach to take about the "way to run migrations". Some references below: