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, "n开发者_运维问答ame" character varying(255) NOT NULL, "title" character varying(255) NOT NULL, "created_at" timestamp, "updated_at" timestamp) ENGINE=MyISAM
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.
精彩评论