May 06, 2007

Posted by John

Tagged migrations

Older: Another Way To Search The Rails API

Newer: Scrobbler: For Ruby

Sexy Migrations

So migrations are brining sexy back…ok, I promise never to mention a JTimb song again on this blog, but it’s true. As of 6667, migrations got a bit of err inspiration. What use to look like this…

create_table "products" do |t| 
	t.column "shop_id",    :integer 
	t.column "creator_id", :integer 
	t.column "name",       :string,   :default => "Untitled" 
	t.column "value",      :string,   :default => "Untitled" 
	t.column "created_at", :datetime 
	t.column "updated_at", :datetime 

now can look like this…

create_table :products do |t| 
	t.integer :shop_id, :creator_id 
	t.string  :name, :value, :default => "Untitled" 

Very nice. Can’t wait to try it out.


  1. for the record, referring to him as JTimb is far worse than referencing lyrics in one of his songs.


    bye bye

  2. @Harle – True.

    @Ryan – Nice. Don’t worry, I have no intentions of treading on your “What’s new…” articles. I promise to only do it when I find the changeset particularly interesting. :)

Sorry, comments are closed for this article to ease the burden of pruning spam.


Authored by John Nunemaker (Noo-neh-maker), a programmer who has fallen deeply in love with Ruby. Learn More.


Release your software more often with fewer problems.
Flip your features.