Plugins - MigrationDataDumper

StarAdd to favorites
So you’re playing around with your latest project which uses these brand spanky new migration thingies. You’re so edgy! You run
rake migrate VERSION=0
rake migrate
to make sure all your migrations are in proper order, and “Oh, Snap!”, all your data went ka-poof!
Sucks, donut? Well, I’m here to help.
This plugin adds two functions for use in migrations that will save and restore data for a single table into a fixture file.
  • save_table_to_fixture dumps data from the table into a fixture file.
  • restore_table_from_fixture copies the data from a fixture file into the table.
    The fixtures are kept under #{RAILS_ROOT}/db/data/#{RAILS_ENV}/, and can then be version controlled (via svn, cvs, etc).

Tammer Saleh

http://blog.tammersaleh.com/pages/migration_data_dumper

svn://rubyforge.org/var/svn/mdd

Rails' (MIT)

  • Currently 5.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Misc. Enhancements

Tags

Comments

Add a comment

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.

Have a comment?