Skip to content

Commit

Permalink
Make migration reversible (AgileVentures#741)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariam Ahhttouche authored and tansaku committed May 15, 2018
1 parent 2acc0b9 commit d34be4a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
class UpdateUserIdForClickThroughs < ActiveRecord::Migration[4.2]
def change
def up
change_column :click_throughs, :user_id, 'integer USING CAST(user_id AS integer)'
end

def down
change_column :click_throughs, :user_id
end
end

0 comments on commit d34be4a

Please sign in to comment.