...
These roles should have been created when you ran rake db:migrate at
some point, but this situation should be quite easy to fix (especially
now that I have to do the same thing in my install, having deleted all
the roles :-) )
Fire up script/console and enter:
Role.create!(:name => "Member", :kind => Role::KIND_MEMBER)
Role.create!(:name => "Administrator", :kind => Role::KIND_ADMIN)
...
That is a problem that should be fixed in my opinion. This is not what
migrations were designed for.
Migrations are intended to evolute the database schema, not to feed the
database with initial data. That is exactly what db/seeds.rb is all about.
Someone installing Gitorious shouldn't use, in principle, "rake
db:migrate" to generate the database but "rake db:setup" instead, which
will call "db:create", "db:schema:load" and then "db:seed".
So, I think that these data should be moved from the migrations to the
db/seeds.rb. What do you think?
Best regards,
Rodrigo.
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]