Browse the Ruby on Rails Community.

You are here: Browse Railsplugins Migration Data Dumper 0.0.1

Migration Data Dumper 0.0.1

= MigrationDataDumper

=== Motivation

The current Rails migration system is great, but while it addresses schema changes wonderfully, it does nothing to preserve the all important data.

=== Solution

This plugin adds the methods save_table_to_fixture and restore_table_from_fixture to ActiveRecord::Migration, which dump and restore the data from the specified table. The data is saved into a fixture file named after the table under #{RAILS_ROOT}/db/data/#{RAILS_ENV}/.

These methods should be called within the migration file, at the end of the up and beginning of the down method. See

NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly

Users


See all details


Membership

+ Join this railsplugin

Record Maintainer

'None'