- What is the source of Database Truth - ORM Model, Datamodel (ER Studio), Flyway
- Python is the best
- lot of thought went into development
- Super fast to develop
- Highly configuration driven
- LOTS of documentation
- pattern exists, easy to implement
- Flyway uses plain SQL for migrations - easy to generate
- ER Studio Datamodel can easily create flyway migrations
- Fastapi is configuration driven...
- we already have an existing data model
- development wants to be able to support datamodel changes while we work, using the ORM Model.
- Existing ORM model was generated from ER Studio output /
- How do we get datamodel changes deployed.
- objective 1:1 relationship between alembic migrations / flyway migrations
- Run flyway migration on temporary database
- Use sqlacodegen to generate a ORM model
- Use Alembic to generate an alembic database migration
- ORM becomes source of truth
- before push/pr
- generate an alembic migration
- generate a flyway migration
- THEN PUSH
- automate generation of alembic migrations and flyway migrations in pipeline