-1
我遇到了我的應用問題。Can not heroku運行rake db:migrate
我試圖運行:
heroku run rake db:migrate
,但我得到這個錯誤:
Running rake db:migrate on pierwsza1... up, run.7908
ActiveRecord::SchemaMigration Load (22.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
Migrating to AddUserIdToPins (20160515200705)
(1.9ms) BEGIN
== 20160515200705 AddUserIdToPins: migrating ==================================
-- add_column(:pins, :user_id, :integrer)
(3.6ms) ALTER TABLE "pins" ADD "user_id" integrer
(8.6ms) ROLLBACK
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::UndefinedObject: ERROR: type "integrer" does not exist
LINE 1: ALTER TABLE "pins" ADD "user_id" integrer
這是我與rails generate migration add_user_id_to_pins user_id:integer:index:
class AddUserIdToPins < ActiveRecord::Migration
def change
add_column :pins, :user_id, :integer
add_index :pins, :user_id
end
end