heroku迁移失败

时间:2012-11-09 14:37:51

标签: 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:

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)

这是我的AlterBodyForDocuments迁移:

class AlterBodyForDocuments < ActiveRecord::Migration
  def change
    change_column :documents, :body, :mediumtext
  end
end

1 个答案:

答案 0 :(得分:2)

我认为中间文本是一个mysql的东西

heroku使用postgresql

使用:text代替

相关问题