Skip to content

How to run specific migration or migrations in specific order? #2751

Answered by weiznich
kyleerhabor asked this question in Q&A
Discussion options

You must be logged in to vote

Diesel's migrations are inherently ordered, by the order you've created the migrations via diesel migration generate (or technically speaking by the part of the migration directory before the first _.)
So if you have a migration that depends on a other migration just put it into a migration with a larger version that the one it depends on. See the documentation of the diesel_migrations crate for details.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kyleerhabor
Comment options

Answer selected by kyleerhabor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants