superclass mismatch for class AddBraintreeIdToTransactionBraintreeInfos

Tag: ruby-on-rails , ruby , postgresql , heroku , superclass Author: liuling6096 Date: 2014-04-22

My site is working fine on my localhost. When I try to do a database migration with heroku, I get the following error:

superclass mismatch for class AddBraintreeIdToTransactionBraintreeInfos

Here are the two migration files. They are running in the order I display them:

1.

class CreateTransactionBraintreeInfos < ActiveRecord::Migration
  def change
    create_table :transaction_braintree_infos do |t|
      t.belongs_to :task, index: true
      t.string :order_id

      t.timestamps
    end
  end
end

2.

class AddBraintreeIdToTransactionBraintreeInfos < ActiveRecord::Migration
  def change
    add_column :transaction_braintree_infos, :braintree_id, :string
  end
end

How do I fix this?

Is AddBraintreeIdToTransactionBraintreeInfos declared anywhere else in your project?
check to make sure you don't have another AddBraintreeIDToTransactionBraintreeInfos definition hanging around somewhere. it could be that you've removed a file locally but it was still stored in git and therefore made it to heroku.
I can't find it anywhere else in the project. I might have deleted a migration a few days ago though, I can't remember. If thats the case, what should I do. My git is a clean directory (meaning it is up to date).