No commit activity in last 3 years
No release in over 3 years
Backup data is saved to yaml files. The reverse process load the yaml and restores the records. Works for new and updates not for deletions.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

= 2.3.14
>= 0
 Project Readme

Reversible Data Migration

Need to update a small amount of data in migration? But still want to make it reversable? Reversable Data Migration comes to the rescue.

Example usage

class RemoveStateFromProduct < ActiveRecord::Migration
  def self.up
    backup_data = []
    Product.all.each do |product|
      backup_data << {:id => product.id, :state => product.state}
    end
    backup backup_data
    remove_column :products, :state
  end
  def self.down
    add_column :products, :state, :string
    restore Product
  end
end

Installing

gem install reversible_data_migration

Rails 2 & 3 supported