0

I am trying to run

heroku rake db:migrate

to run my migrations on heroku and the first two migrations ran great but the third which looks like this

create_table :charities, :options => "ENGINE=MyISAM" do |t|
  t.string :name,               :null => false
  t.string :title,              :null => false
  t.timestamps
end

add_index :charities, :name
add_index :charities, :title


Migrating to CreateCharitiesAndThemes (20091019140537)
==  CreateCharitiesAndThemes: migrating =======================================
-- create_table(:charities, {:options=>"ENGINE=MyISAM"})
rake aborted!
An error has occurred, this and all later migrations canceled:

PGError: ERROR:  syntax error at or near "ENGINE"
LINE 1: ..., "created_at" timestamp, "updated_at" timestamp) ENGINE=MyI...
                                                             ^
: CREATE TABLE "charities" ("id" serial primary key, "name" character varying(255) NOT NULL, "title" character varying(255) NOT NULL, "created_at" timestamp, "updated_at" timestamp) ENGINE=MyISAM
mikong
  • 8,270
  • 3
  • 16
  • 15
Matt Elhotiby
  • 43,028
  • 85
  • 218
  • 321

1 Answers1

9

Heroku uses PostgreSQL, and MyISAM engine is MySQL-specific. I suggest you remove that part. Or, add checking on what database is used and make that optional.

Here's a link to how to check the database.

Community
  • 1
  • 1
mikong
  • 8,270
  • 3
  • 16
  • 15