Blogger.create { :name =>'Matt Aimonetti',
:location => 'San Diego, Ca',
:email => mattaimonetti AT gmail.com,
:linkedin => Matt's Linkedin page,
:recommend_me => HERE,
:contractor => true}

my Rails contribution mentioned in DHH keynote

Written by matt on September 18th, 2007

That's kind of cool, I was reading a post about DHH Keynote at RailsConf Europe when I realized that DHH mentioned one of my contribution to Rails Edge.

"small, but to me significant improvement has also found its way to Rails 2.0: You can now create the needed databases with a rake command. By running this command, all referenced databases in your database.yml will be created"


rake db:create:all

I'm glad to see that my contribution is appreciated, as a reminder you also have the following options:

Only create your current environment database (can be useful to bootstrap your application):


rake db:create

Another command I use often in development is:


rake db:reset

It simply drops your current environment database, re create it and migrate it :) (btw, your new database will be utf-8 by default)

Here is a list of the new rake tasks:

1
2
3
4
rake db:create                       # Create the local database defined in config/database.yml for the current RAILS_ENV
rake db:create:all                   # Create all the local databases defined in config/database.yml
rake db:drop                         # Drops the database for the current environment
rake db:reset                         # Drops, creates and then migrates the database for the current environment. Target specific version with VERSION=x

Read DHH Keynote summary there



Comments

  • Dr Nic on 19 Sep 00:56

    Champion effort!

  • Jamie Hill on 21 Sep 00:12

    Thought I'd seen this before when DHH mentioned it in the keynote but couldn't remember where. It has/is going to save me hours all in all, good work!

  • Lake Denman on 26 Sep 20:55

    good work, matt! I was looking for something like this earlier. awesome.

  • Subash on 12 Dec 00:59

    Hi Matt... Its amazing, I have started the learning of rails 2.0 and I came across this stuff. The video tutorial at http://railscasts.com/ mentioned this feature. Please check this : http://railscasts.com/episodes/83

Comments are closed