2012-11-09 102 views
2

在Heroku的我跑耙分贝:迁移并得到了以下错误Heroku的迁移失败

== 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 

回答

2

我觉得MEDIUMTEXT是一个MySQL的事情

heroku使用postgresql

使用:text代替