Migrations may seem confusing at first glance, but once you get used to them, migration naturally works in Rails. If you are mistaken in the name, you simply roll back and fix the migration file. Or write another moment that fixes the error in the rare case when you used it on db production.
They give you much more energy, especially if your project has gone through several stages of the version. You can roll back and transfer to any previous state at any time, and when you add new columns, you can easily set default values or write short ruby scripts that adjust values or relationships.
source share