Irreversible migration, can it be fixed? - Rails 4
问题 So i made a migration like this class AddDatetimeAttrToUsers < ActiveRecord::Migration def change change_column :users, :oauth_expires_at, :datetime end end on my local environment it works just fine but when i try heroku run rake db:migrate i get an error ERROR: column "oauth_expires_at" cannot be cast automatically to type timestamp without time zone HINT: Specify a USING expression to perform the conversion. When i searched it, i created a new migration like this as best practice for