RailsGrunt

a noob working the ruby railroad.

about migrations and why the grunt uses them

February 13th, 2007

When I first started working with rails, I could not understand why use migrations vs working with databases the plain old brute force way of manually mysql’ing everything. well lets just say the grunt is now happy to use them. What are migrations? migrations is a way to add, modify, delete, rename, reconfigure tables and field names within tables easy. cool thing about migrations is that you dont have to worry about ruining tables since you can move back and forth between versions of your database history. therefore, if later during the lifetime of your website you decide to add a new category field to your table of food types, you can add new columns or rename old ones easily. Also, if you created a new table and realize that that table or change to a field name was a mistake, all you would need to do is type a command and step back a version. really easy, so easy a grunt can do it!