这是我尝试跑步时得到的heroku run rake db:migrate
sender_id
曾经是一个string
== ChangeTypeToInteger: migrating ============================================
-- change_column(:messages, :sender_id, :integer)
rake aborted!
An error has occurred, this and all later migrations canceled:
PG::Error: ERROR: column "sender_id" cannot be cast automatically to type integer
HINT: Specify a USING expression to perform the conversion.
: ALTER TABLE "messages" ALTER COLUMN "sender_id" TYPE integer/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:652:in `exec'