2

在 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
4

1 回答 1

2

我认为mediumtext是mysql的东西

heroku 使用 postgresql

:text改为使用

于 2012-11-09T14:42:54.680 回答