From 89913641bc309b3bbe8e132f4a7b0cdffda87ac1 Mon Sep 17 00:00:00 2001 From: John McAliley Date: Mon, 6 May 2013 10:30:26 -0300 Subject: [PATCH] Update create_impressions_table.rb add length for message --- .../active_record/templates/create_impressions_table.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generators/active_record/templates/create_impressions_table.rb b/lib/generators/active_record/templates/create_impressions_table.rb index 5282380..c874863 100644 --- a/lib/generators/active_record/templates/create_impressions_table.rb +++ b/lib/generators/active_record/templates/create_impressions_table.rb @@ -14,7 +14,7 @@ class CreateImpressionsTable < ActiveRecord::Migration t.text :referrer t.timestamps end - add_index :impressions, [:impressionable_type, :message, :impressionable_id], :name => "impressionable_type_message_index", :unique => false + add_index :impressions, [:impressionable_type, :message, :impressionable_id], :name => "impressionable_type_message_index", :unique => false, :length => {:message => 255 } add_index :impressions, [:impressionable_type, :impressionable_id, :request_hash], :name => "poly_request_index", :unique => false add_index :impressions, [:impressionable_type, :impressionable_id, :ip_address], :name => "poly_ip_index", :unique => false add_index :impressions, [:impressionable_type, :impressionable_id, :session_hash], :name => "poly_session_index", :unique => false