rails-stripe-membership-saas icon indicating copy to clipboard operation
rails-stripe-membership-saas copied to clipboard

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

Open Hatcher19 opened this issue 9 years ago • 2 comments

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 avatar Aug 18 '15 15:08 Hatcher19

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.

Hatcher19 avatar Aug 18 '15 22:08 Hatcher19

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.

MugOfPaul avatar Feb 25 '17 21:02 MugOfPaul