Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upHow are people running their migrations in production? #559
Comments
killercup
added
the
discussion desired
label
Jan 1, 2017
This comment has been minimized.
We provide the We also have the Interested in other people's thoughts/stories around this. |
This comment has been minimized.
|
I believe that in order to safely run migrations you need to be using the I would love to see more docs around migrating from |
This comment has been minimized.
|
|
killercup
added this to Guides
in Documentation
Feb 12, 2017
This comment has been minimized.
jasonl
commented
Jul 26, 2017
|
I'll add a data point here - we're using We're not yet deploying multiple instances of the container, so haven't run into any potential problems with multiple instances running migrations at once, but a bit of thought says that they should be okay, and if not, the migrations could easily be wrapped with a PG advisory lock or similar. So far this approach works very well for us. |
This comment has been minimized.
|
I'm clearing out old issues, and I'm going to close this as there's not much discussion still happening here. To add a final datapoint:
The way we run migrations on crates.io is literally by having our "run" task be |
sgrif
closed this
Dec 16, 2017
This comment has been minimized.
|
For people coming here looking for an up-to-date way of embedding migrations (with diesel 1.x), the current way of doing it is:
|
drusellers commentedDec 30, 2016
I'm curious how people are running their migrations in production. I haven't seen any documentation about best practices there.
I'd be interested in having my application at start up run the migrations as well, are there any code samples for that.
Thank you