bitwalker / distillery

Simplify deployments in Elixir with OTP releases!
MIT License
2.97k stars 398 forks source link

running_migrations -- improvements and questions #589

Closed GildedHonour closed 5 years ago

GildedHonour commented 5 years ago

https://github.com/bitwalker/distillery/blob/master/docs/guides/running_migrations.md

1) How does Phoenix or Elixir manage to remember which migrations have already been run and which not? If you run the "migrate" 2 times, even in different deploys, will it be applied twice?

2) If one runs "migrate" or "seeds" they'll get an error because a database doesn't exist. Why nothing about this is mentioned anywhere?

OvermindDL1 commented 5 years ago

How does Phoenix or Elixir manage to remember which migrations have already been run and which not? If you run the "migrate" 2 times, even in different deploys, will it be applied twice?

Seems rather ecto specific to be in Distillery, but Ecto creates a version table that details what migrations it already ran and it checks that first.

If one runs "migrate" or "seeds" they'll get an error because a database doesn't exist. Why nothing about this is mentioned anywhere?

Also seems ecto specific and not specific to distillery, but ecto details how to connect to the database.

GildedHonour commented 5 years ago

Also seems ecto specific and not specific to distillery, but ecto details how to connect to the database.

This is not about how to connect to connect to it