I experienced this error when I tried to run rake db:migrate
.
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::DatatypeMismatch: ERROR: column "developer_id" cannot be cast automatically to type integer HINT: You might need to specify "USING developer_id::integer".
I am changing my sqlite3 database to PostgreSQL for deployment in Heroku. I am assuming the error is coming from the db/migrate file.rb that has the developer_id column specified.
def change
change_column :entries, :developer_id, :integer
end
end
I will add any other document that may help locate the problem.