3
我最近公佈的this questionRails 3,遷移在本地工作,在Heroku中不起作用?
與我選擇正確的答案在本地工作,這裏是我主要使用的遷移:
class ChangeColumnToUsers < ActiveRecord::Migration
def self.up
change_column :users, :created_at, :datetime
end
def self.down
change_column :users, :created_at, :string
end
end
運行的Heroku耙分貝後:遷移,我收到此錯誤:
rake aborted!
An error has occurred, this and all later migrations canceled:
PGError: ERROR: column "deadline" cannot be cast to type "date"
: ALTER TABLE "tasks" ALTER COLUMN "deadline" TYPE date
(See full trace by running task with --trace)
(in /disk1/home/slugs/18c5c920-2e22-40f5-8d6a-b20a0fc5d7ba/mnt)
== ChangeColumnToUsers: migrating ============================================
-- change_column(:users, :created_at, :datetime)
任何想法?