The Artima Developer Community
Sponsored Link

Agile Buzz Forum
DB Content Rails Plugin

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Oliver Steele

Posts: 112
Nickname: ows
Registered: Aug, 2003

Oliver Steele is Chief Software Architect at Laszlo Systems, Inc.
DB Content Rails Plugin Posted: Apr 17, 2008 7:19 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by Oliver Steele.
Original Post: DB Content Rails Plugin
Feed Title: Oliver Steele on Software
Feed URL: http://feeds.feedburner.com/osteele
Feed Description: Languages of the real and artificial.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by Oliver Steele
Latest Posts From Oliver Steele on Software

Advertisement

The DB Content Rails plugin adds tasks to save and restore database content.

Usage

— dump the development database to db/archive/development-content.sql.gz
rake db:content:dump
 
— load the dumped database, and apply any necessary migrations
$ rake db:content:load
 
— dump the production database to db/archive/production-content.sql.gz
$ RAILS_ENV=production rake db:content:dump
 
— save the development database to db/archive/{timestamp}.sql.gz
$ rake db:content:save
 
— save the (compressed) database to my-data.sql.gz
$ rake db:content:save FILE=my-data.sql.gz
 
— save the (uncompressed) database to my-data.sql
$ rake db:content:save FILE=my-data.sql
 
— load the database from my-data.sql
$ rake db:content:load FILE=my-data.sql

Tasks

rake db:content:archive

Saves a timestamped database to db/archive/{timestamp}.sql.gz.

rake db:content:dump

Dumps the database to FILE or db/{RAILS_ENV}-content.sql.gz. If FILE ends in .gz, the file is compressed.

rake db:content:load

Loads the database from FILE or db/{RAILS_ENV}-content.sql.gz, and migrates it to the current schema version. If FILE ends in .gz, the file is piped through gunzip.

Installation

git clone git://github.com/osteele/javascript_fu.git vendor/plugins/db_content

If you’re running off Edge Rails (or, presumably, Rails > 2.0.2), you should be able to do this instead:

script/plugin install git://github.com/osteele/db_content

Limitations

The plugin works only with the MySQL databases. (It adds methods to the Mysql adaptor; see the source.) The gzip option probably only works on *nix (MacOS, Linux, etc.).

Read: DB Content Rails Plugin

Topic: The Smalltalk Team Previous Topic   Next Topic Topic: At the Meeting

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use