Brian Corrales

Ruby on Rails vs PHP

by brian.corrales on Jun.03, 2007, under Ruby on Rails, Technology

Alright, so my next post is technology based. I’ll get to some martial arts stuff soon I promise. Jimmy showed me this youtube video on these guys did a superb job at explaining the joys of Ruby on Rails development. Imagine setting up a database schema and throughout development you add a table here, or a column there. Your code and db schema evolve throughout the process. Then BAM, you need to revert your application code to a previous version. I’ve found it quite difficult to revert my db schema back to the same version. Well, Ruby on Rails has a nice module called migrations. Migrations are 100% Ruby code which can create your db schema for you. As you add tables, modify a column, or whatever you need to during the db schema lifecycle, migrations keep a record of every change you make and an easy way to revert at any time. Once migrations are set up, reverting is as easy as typing “rake db: migrate VERSION=10″.

Enjoy the film:

[?]
Share This

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!