Skip to content

Commit

Permalink
Add upgrade migration
Browse files Browse the repository at this point in the history
  • Loading branch information
rposborne committed May 26, 2017
1 parent a344b2e commit 9c89d75
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions upgrade_migrations/version_1_5_2.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class Version152UpdateImpressionsTable < ActiveRecord::Migration
def self.up
add_column :impressions, :params, :text

add_index :impressions, [:impressionable_type, :impressionable_id, :params], :name => "poly_params_request_index", :unique => false
end

def self.down
remove_index :impressions, [:impressionable_type, :impressionable_id, :params], :name => "poly_params_request_index"
remove_column :impressions, :params
end
end

0 comments on commit 9c89d75

Please sign in to comment.