kubido
kubido

Reputation: 568

heroku rake db:migrate didn't work

I've run a migration adding active column to users using heroku rake db:migrate. and succesfully. but when I run the application the "active" column/attributes is not defined.

I already try to migrate:down and run migrate again for that version.. but it's still not worked.

Upvotes: 0

Views: 651

Answers (3)

rich
rich

Reputation: 2136

Try this, it will run both the up and the down which will help you better analyze the situation. Also, there may be a problem in your migrations, if you post the code I should be able to asset further.

rake db:migrate:redo

Upvotes: 1

stephenmurdoch
stephenmurdoch

Reputation: 34603

did you add :active to the list of accessible attributes?

attr_accessible :active    

failing that, sometimes you need to run heroku rake db:restart

and just finally, if it's still not working, run heroku logs and you will probably find something

Upvotes: 2

Mikhail Nikalyukin
Mikhail Nikalyukin

Reputation: 11967

Try to restart you application or drop database, if it doesnt contain valuable information.

Upvotes: -2

Related Questions