[Rails] Intial data in Migrations

Tom Mornini
Sat, 11 Feb 2006 01:03:50 -0000

db/migrate:
   001_create_schema.rb
   002_load_units.rb
   003_load_settlement_states.rb

--
-- Tom Mornini

On Feb 10, 2006, at 4:02 PM, Sean Wolfe wrote:

> One thing I found annoying about Migrations, besides that you have a
> very limited ways to define your data, is that it will overwrite
> EVERYTHING in your schema file. So if you spend hours customizing your
> initial schema file, to get it work, exactly like you''ll need it,
that
> work immediately becomes for nothing once you run a migration. Your
> entire schema will get rewritten, not appended to.
>
> In that case, with migrations, how is one suppose to handle initial
> data, such a look up table (such as state or country). Do those get
> put into a separate file? something like an initialize_db.rb?
>
> How have others been able to handle this with migrations?
>
> --
> Sean Wolfe
> master nerd of
> i heart squares, Co.
>
> 3711 N. Ravenswood Ave. #147 Chicago, IL 60613
> Ph. (773) 531-6301  Fx. (773) 529-7041
> http://www.iheartsquares.com
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails