Sexy Migrations
May 6th, 2007
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
end
now can look like this…
create_table :products do |t|
t.integer :shop_id, :creator_id
t.string :name, :value, :default => "Untitled"
t.timestamps
end
Very nice. Can’t wait to try it out.
3 Responses to “Sexy Migrations”
Sorry, comments are closed for this article to ease the burden of pruning spam. If you have any further comments, just send me an email.

May 6th, 2007 at 11:59 PM
for the record, referring to him as JTimb is far worse than referencing lyrics in one of his songs.
bye ... bye bye
May 7th, 2007 at 08:07 AM
Jinx
May 8th, 2007 at 10:17 AM
@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. :)