Blogger.create { :name =>'Matt Aimonetti',
:location => 'San Diego, Ca',
:email => mattaimonetti AT gmail.com,
:linkedin => Matt's Linkedin page,
:recommend_me => HERE,
:contractor => true}
db_tasks or how to easily manage your db
Written by matt on May 21st, 2007
Josh knowles and Matt Heidemann from Integrum and I released few weeks a go a cool plugin called rake_tasks
The thing is that the plugin was getting too big when I started hacking the MySQL adapter and adding utf-8 support we figured out it was smarter to split the plugin and create dbtasks and svntasks
I temporarily hosted db_tasks there:
http://svn.aimonetti.net/public/plugins/db_tasks/
ruby script/plugin install http://svn.aimonetti.net/public/plugins/db_tasks/
check your Rake tasks:
- rake db:create Creates the databases defined in your config/database.yml (unless they already exist) You can also specify the charset and collation you want your dbs to use: rake db:create CHARSET='latin1' COLLATION='latin1_bin')
- rake db:drop Drops the database for your currenet RAILS_ENV as defined in config/database.yml
- rake db:reset Drops, creates and then migrates the database for your current RAILS_ENV
- rake db:shell Launches the database shell using the values defined in config/database.yml
- rake db:charset Returns the charset of your current RAILS_ENV database
- rake db:collation Returns the collation of your current RAILS_ENV database
- rake db:update_connection_settings add the encoding format to each environment in the database.yml file
By default, your new databases will be utf8, you can automatically create your databases by typing:
rake db:create
or reset your databases (drop, create, migrate)
rake db:reset
Another simple plugin for lazy developers.
0 comments
Comments are closed
Recent
Articles
feed- Googlecharts featured on Github (June 27th)
- About Metaprogramming speed (June 18th)
- News update (June 17th)
- Avoid using metaprogramming (seriously!) (May 4th)
- BarCamp San Diego rev.3 (April 27th)
- Freezing Rails with Git (April 16th)
- Merb tip - how to freeze a project? (April 15th)
- Rails or Merb, what's best for you? (April 10th)
- Merb tips II (April 7th)
- Merb tips I (April 4th)
- How Duplo (and I) offended people (March 20th)
- Ruby on Rails: the Duplo generation (March 16th)
- starting the migration to GitHub (March 4th)
- How to use github and submit a patch (March 3rd)
- resolving git-svn conflicts (February 29th)
Comments
feed- Scott onAjax Pagination in less than 5 minutes
- Emmanuel Oga onAbout Metaprogramming speed
- Emmanuel Oga onAbout Metaprogramming speed
- Matt Aimonetti onNews update
- Bradly Feeley onNews update
- Roberto onAjax Pagination in less than 5 minutes
- R. Elliott Mason onRails or Merb, what's best for you?
- Alain onSexy charts in less than 5 minutes
- Rob Kaufman onAvoid using metaprogramming (seriously!)
- Tim Harper onAvoid using metaprogramming (seriously!)
- Tim Harper onAvoid using metaprogramming (seriously!)
- Ken Miller onAvoid using metaprogramming (seriously!)
- Ken Miller onAvoid using metaprogramming (seriously!)
- DaveS onAvoid using metaprogramming (seriously!)
- allen onAvoid using metaprogramming (seriously!)
Archives
Archives
- June 2008 (3)
- May 2008 (1)
- April 2008 (6)
- March 2008 (4)
- February 2008 (2)
- January 2008 (2)
- December 2007 (8)
- November 2007 (5)
- October 2007 (5)
- September 2007 (6)
- August 2007 (5)
- July 2007 (11)
- June 2007 (10)
- May 2007 (7)
- April 2007 (4)
- March 2007 (3)


