RailsApps / rails-stripe-membership-saas

An example Rails 4.2 app with Stripe and the Payola gem for a membership or subscription site.

Home Page:http://railsapps.github.io/rails-stripe-membership-saas

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Hatcher19 opened this issue · 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.

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.

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.