How to run specific migration or migrations in specific order? #2751
-
I'm using the Diesel CLI to manage tables. I have a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Diesel's migrations are inherently ordered, by the order you've created the migrations via |
Beta Was this translation helpful? Give feedback.
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.