A recent practice of mine is to verify that my migrations work both ways. That means migrating, rolling back migrations and then migrating again. This has helped me find issues that I otherwise would have missed.
The issues I find usually have something to do with relationships or migrations that alter tables. While foreign key relationships can be complicated to deal with, they are great for data integrity and query efficiency. So do yourself a favor and make sure those migrations always work forwards and backwards!
The issues I find usually have something to do with relationships or migrations that alter tables. While foreign key relationships can be complicated to deal with, they are great for data integrity and query efficiency. So do yourself a favor and make sure those migrations always work forwards and backwards!
Comments
Post a Comment