Project

General

Profile

db:migrate doesn't seems to work...

Added by oranso fire over 14 years ago

I had a working redmine version 0.7.0, it was working fine and all was good.
After a few months we decided to move the redmine to a new server.
Both new and old servers had Ubuntu Server 8.04 installed.
We backed up the files and database of the old redmine.
On the new server we installed the Bitnami redmine 0.8.6 stack.
We restored the database backup on the new server and also the files.

At first it looks like everything was ok but after a few clicks we found that the Wiki and Source Repository aren't working.
When trying to view the Repository we receive:

NoMethodError in RepositoriesController#show

undefined method `user_id' for #<Changeset:0xb71e77e4>

When trying to view the Wiki we receive:

NoMethodError in WikiController#index

undefined method `protected?' for #<WikiPage:0xb6f46a58>

After a little investigating + searching the web we discovered that there are missing columns in the database and we needed to run rake db:migrate
in order to update the database schema to the new (0.8.6) redmine version.

Now here is the thing, after running "sudo RAILS_ENV=production rake db:migrate" we still received the above errors.
Checking the database we saw that no changes to the database were made although "rake db:migrate" executed with out any error.

At present we are stuck since all over the web people say that after running the migrate procedure with out errors the database should be up to date.
It is not the case here :(

Any help/suggestion would be most welcomed