0

I have tables and it's schema. I neither have the database nor Sqlalchemy models. How do I generate alembic first version script with this information?

P.S. I could create a database with existing schema if that could be of help to get the alembic scripts.

1 Answers1

1

you can use sqlcodegen to generate the sqlalchemy models, then create an empty database and use these models to create the initial alembic script.

moshevi
  • 4,999
  • 5
  • 33
  • 50