Josh's rake task looks like it provides a nice ability to load data
via Rake.  But there is an inconsistent message being sent by Rails:

Use Migrations.  Use Migrations.  Use Migrations.

Except for testing, where we'll use a limited, one-off method (schema
dumper) ensuring that you'll never know if your migrations are broken
until it's too late.

Why?  Migrations are perfectly capable of handling the test DB setup:
like schema dumper they are database-neutral, but they also support
seed data loading and where desired, DB-specific commands.  Plus, they
are the blessed approach to building development and production
databases and could thus benefit from regular exercise during testing
as well.

Is there a good reason for the avoidance of migrations for building
the test DB, or is the use of schema dumper just a vestige of days
gone by?  I continue to be surprised by the lack of comments from the
core team on this thread (Koz's early comment being the only one) and
the lack of feedback on ticket 8389.

For those of you that have bought into migrations like I have, add
your thoughts (or improvements) to the patch on ticket 8389.

-Chris


On Nov 28, 5:22 pm, "Josh Knowles" <[EMAIL PROTECTED]> wrote:
> On 11/13/07, Stephen Touset <[EMAIL PROTECTED]> wrote:
>
> > 1 ) What, then, is the preferred mechanism for "seed" data in the
> > database? Currently, many people use migrations to insert bootstrap
> > data. If schema.rb will be used for tasks like db:reset, none of this
> > data will be loaded.
>
> I've written a simple rake task that loads any .rb files found within
> the RAILS_ROOT/db/fixtures/RAILS_ENV directory.  I've bundled it up as
> a plugin if anyone else wants to try it 
> out:http://code.google.com/p/db-populate/.  README, examples, etc. to come
> soon.
>
> --
> Josh Knowles
> phone: 509-979-1593
> email:  [EMAIL PROTECTED]
> web:    http://joshknowles.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to