# Migration error after upgrading project to Rails 2.0

**URL:** <https://www.ruby-forum.com/t/migration-error-after-upgrading-project-to-rails-2-0/146449>\
**Category:** Rails\
**Created:** [August 21, 2008, 9:41am UTC](https://www.ruby-forum.com/t/migration-error-after-upgrading-project-to-rails-2-0/146449 "2008-08-21T09:41:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 21, 2008, 9:41am UTC](https://www.ruby-forum.com/t/migration-error-after-upgrading-project-to-rails-2-0/146449/1 "2008-08-21T09:41:39Z")

</div>

Hi,

I started writing a project using Rails 1.x, then moved to 2.0 a  
couple of weeks after it came out. This moved the project to the new  
migration structure (timestamp based), and everything’s worked fine on  
my development environment. I’ve since done the initial deployment of  
the project to my production environment and the initial DB migration  
ran fine and the application works as expected. A couple of days ago I  
created another migration and it worked fine on my dev environment,  
but in the production environment it comes back with the error:

rake aborted!  
PGError: ERROR: relation “schema\_migrations” already exists  
: CREATE TABLE “schema\_migrations” (“version” character varying(255)  
NOT NULL)

It seems to think that it needs to switch the project over to the new  
migration tables again. Has anyone come across this before and have  
any ideas how to fix it?

Thanks,  
Simon
