Ruby on rails heroku迁移失败
在heroku中,我运行了rake db:migrate并得到了以下错误Ruby on rails heroku迁移失败,ruby-on-rails,heroku,rails-migrations,Ruby On Rails,Heroku,Rails Migrations,在heroku中,我运行了rake db:migrate并得到了以下错误 == AlterBodyForDocuments: migrating ========================================== -- change_column(:documents, :body, :mediumtext) rake aborted! An error has occurred, this and all later migrations canceled: PGErro
== AlterBodyForDocuments: migrating ==========================================
-- change_column(:documents, :body, :mediumtext)
rake aborted!
An error has occurred, this and all later migrations canceled:
PGError: ERROR: type "mediumtext" does not exist
: ALTER TABLE "documents" ALTER COLUMN "body" TYPE mediumtext
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
这是我的文档迁移备选方案:
class AlterBodyForDocuments < ActiveRecord::Migration
def change
change_column :documents, :body, :mediumtext
end
end
class AlterBodyForDocuments
我认为mediumtext是mysql的东西
heroku使用postgresql
改用:text