Yes you must check in the schema.rb into your SCM.
Yes you must use db:schema:load
Be careful schema.rb won’t allow you to load “default” entries into
the DB
My question is, if I want to have for instance a default user inserted
into DB such as an admin user, how do you handle that? Mixing migrations
and schema.rb is dangerous.
On Wed, Sep 10, 2008 at 3:04 PM, Fernando P. [email protected] wrote:
My question is, if I want to have for instance a default user inserted
into DB such as an admin user, how do you handle that? Mixing migrations
and schema.rb is dangerous.
Just to let you know: be extremely CAREFUL with rake db:schema:load.
If you run it by mistake on production server, it cleans up the DB. I
tried that whem my rake db:migrate didn’t want to make the new changes
go live, and I discovered I had reset the whole DB.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.