I don’t have much to offer on the wider strategic issue on how to approach evolving databases. It doesn’t seem that different to me from evolving a code base in general. In most applications the database will be close to the ‘core’, so like core code in general perhaps you’d aim for it to move more conservatively than the outer layers. Eventually anyway.
On the narrower point - all relational databases I’ve used implement ALTER TABLE, so is there some particular reason why you’d drop the database when adding columns? In any case, yes, Ecto can help via the alter macro.
Understood. I have used it in production on very large databases. Admittedly that was a long time ago, and I usually had a dba approval. Assuming you’re using one of the standard databases, I think you can assume it’s the most battle-tested part of your overall system. Of course it’s not something you’d do lightly nor without some pretty serious testing.
what is the problem with Alter Table? If you’re scared then do everything in the test database. After writing the migration run the migration in test DB and see what it does.