Ruby on Rails vs PHP
June 3rd, 2007 . by brian.corralesAlright, 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