I am coming from the Rails world and what I like about Rails is the approach to migrations with a final schema.rb or structure.sql file. This means we don’t have to run all previous migrations to setup a database, just import the schema and you are good to go.
In my opinion this has the following advantages:
1, it’s fast to populate the db
2, there is one source of truth of how the db looks like (commited to source control)
3, it’s easy to delete old migrations and move on
I start to feel that our Phoenix migrations are a little bit unwieldy especially when your colleagues puts things in some migrations that should be just import scripts.
Since Phoenix have a lot of great and thought-out design decisions I would like to know if I am missing something. What’s the benefit of not having a schema file?
I remember that might be some conflicts when merging, but apart from that I don’t know.
What’s your take? Do you follow the Phoenix default?