0.0
No commit activity in last 3 years
No release in over 3 years
While Seed Fu solves the problem for inserting and maintaining seed data in a database, Seed Fu-ndo adds the possiblity to remove this data again.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

>= 2.2.0
 Project Readme

Seed Fu-ndo¶ ↑

Seed Fu-ndo adds undo functionality to Seed Fu. While Seed Fu solves the problem for inserting and maintaining seed data in a database, Seed Fu-ndo adds the possiblity to remove this data again.

How do I run it?¶ ↑

Once you have your Seed Fu fixtures set up and seeded into the database, just run

rake db:unseed_fu

To unseed your data programmatically, there is an equivalent SeedFuNdo class

SeedFuNdo.unseed(fixture_paths, filter)

How does it work?¶ ↑

The process is fairly simple: The Seed Fu fixtures are processed as usual but without actually inserting any data. Instead, the to-be-seeded records are simply recorded. When all files are processed, the recorded entries are destroyed in reverse order from the database.