From 9c89d75c600064874658cd0e1c0af2c13ef295e3 Mon Sep 17 00:00:00 2001 From: Russell Osborne Date: Sun, 4 Dec 2016 02:06:33 -0500 Subject: [PATCH] Add upgrade migration --- upgrade_migrations/version_1_5_2.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 upgrade_migrations/version_1_5_2.rb diff --git a/upgrade_migrations/version_1_5_2.rb b/upgrade_migrations/version_1_5_2.rb new file mode 100644 index 0000000..4f64615 --- /dev/null +++ b/upgrade_migrations/version_1_5_2.rb @@ -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 \ No newline at end of file