Replies: 3 comments 2 replies
-
I am also interested in an answer for this. I like the idea of the declarative approach, but I'm not sure what the best approach is for also handling up+down data migrations (which are commonly done in my alembic migrations). |
Beta Was this translation helpful? Give feedback.
-
Hey, you guys may missing this update: |
Beta Was this translation helpful? Give feedback.
-
I asked a question about data migrations in the discord the other day, then discovered that they're completely possible with Atlas (or seemingly any schema migration tool, like goose etc). Atlas itself only generates schema stuff, but you can manually or programmatically add any Sql that you want to the resulting Sql files. They talk about it in various places in the docs, particularly with regards to seeding. https://atlasgo.io/versioned/checkpoint#seeding-data You can even use templates that read from other files And a combined declarative +versioned approach is discussed here https://atlasgo.io/versioned/diff |
Beta Was this translation helpful? Give feedback.
-
For context:
We use alembic for migrations and follow a rule that
no down migrations
, and do dry run in alembic in local to avoid problems.For managing deployment, we have a job in k8s that runs alembic migrations (in a single transaction), in case it succeeds upgrades services, or else it won't.
Few questions
Beta Was this translation helpful? Give feedback.
All reactions