Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PG::DuplicateTable: ERROR: relation "payola_sales" already exists #156

Open
Hatcher19 opened this issue Aug 18, 2015 · 2 comments
Open

PG::DuplicateTable: ERROR: relation "payola_sales" already exists #156

Hatcher19 opened this issue Aug 18, 2015 · 2 comments

Comments

@Hatcher19
Copy link

PG::DuplicateTable: ERROR: relation "payola_sales" already exists

I'm getting this error after I migrate my DB in heroku. Not sure where to find this migration. All my new migrations haven't run and has left my production site in limbo. A few searches on the new and i wasnt able to find anything. Any help would be appreciated.

@Hatcher19
Copy link
Author

I ended up working around it. I ran heroku run rake db:migrate:status to see the migrations that were down and then i ran heroku run rake db:migrate:up VERSION=XXX. not a long term solution.

@MugOfPaul
Copy link

Actual problem appears that the schema.rb already has the payola tables in it but the migration is in the queue (specifically 20141001170138 CreatePayolaSales) to create the tables. Easiest fix was to delete all the payola tables in schema.rb and I ran rake db:drop && rake db:setup && rake db:migrate just to be safe. Now it seems to be clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants