Saturday, February 18, 2012

[Rails] Re: rake db:reset doesn't work, fails with unknown attribute: user_status

Colin Law wrote in post #1047551:
> On 18 February 2012 16:42, S Ahmed <sahmed1020@gmail.com> wrote:
>>
>> Does this mean my migrations are not dropping things correctly?
>
> I believe that rake db:reset re-creates the db and loads the schema
> from schema.rb rather than running the migrations [1]. Is there
> something odd in schema.rb, possibly related to user_status?
>
> [1] http://guides.rubyonrails.org/migrations.html#resetting-the-database

You might also try:

rake db:migrate:reset

As I understand it that will actually drop the database and recreate it
by running all your migration. This should then also recreate your
schema.rb file.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate