3 ms·
Is there a quicker but still fairly safe alternative to this? If you're working solo for example, this doesn't sound practical.
by seanwilson 7y ago
Is there a quicker but still fairly safe alternative to this? If you're working solo for example, this doesn't sound practical.
- matwood 7y agoI'll answer both your questions here. Yes, we can rollback a db change using migrates but usually a true rollback requires a restore since data will be lost. In general what I have found is that database changes are unique to your situation. When an app is small it's fine for them to automatically run with the code commits. The system I deal with now has some very large tables, and running database migrations often requires planning. A column addition might be added weeks before the code is written to use the new column. It's just the nature of dealing with large tables. Working solo, typically also means smaller, so there is a lot more leeway. I would do whatever works for you, and realize it's a good thing if you ever large enough to need to address other problems.