user1812466
user1812466

Reputation: 21

heroku migration fails

In heroku I ran rake db:migrate and got the following error

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

this is my AlterBodyForDocuments migration:

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

Upvotes: 2

Views: 125

Answers (1)

Nick Ginanto
Nick Ginanto

Reputation: 32120

I think mediumtext is a mysql thing

heroku uses postgresql

use :text instead

Upvotes: 2

Related Questions