Seed Migrations provides migration-like support for seed data. Ruby on Rails versions 3 and 2.3.4 introduced the db:seed Rake task that executes a db/seeds.rb file containing normal ruby code. There's nothing special about the code that goes in this file, and no other special features for managing seed data are provided. Depending on how you write your code, running rake db:seed multiple times yields duplicate data inserts.
The main features provided:
- a seedings table in your database to track which seeds have been previously loaded
- support for Rails versions before 2.3.4 which lack the db:seed Rake task
- db/seeds/seed_order.yaml controls the seed load order
- script/generate seed descriptive-name generates an empty, timestamped seed file and appends an appropriate entry to db/seeds/seed_order.yaml
Installation is simply:
script/plugin git://github.com/n3bulous/seed_migrations.git cp vendor/plugins/n3bulous-seed_migrations/db/seeds.rb db/
