Use `text` columns rather than `string` in generated migration.
This commit is contained in:
parent
5ed4d5f163
commit
345f917d4a
|
@ -8,30 +8,30 @@ class CreateImpressionsTable < ActiveRecord::Migration
|
||||||
t.string :action_name
|
t.string :action_name
|
||||||
t.string :view_name
|
t.string :view_name
|
||||||
t.string :request_hash
|
t.string :request_hash
|
||||||
t.string :session_hash
|
|
||||||
t.string :ip_address
|
t.string :ip_address
|
||||||
t.string :message
|
t.text :session_hash
|
||||||
t.string :referrer
|
t.text :message
|
||||||
|
t.text :referrer
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
add_index :impressions, [:impressionable_type, :impressionable_id, :request_hash], :name => "poly_request_index", :unique => false
|
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, :ip_address], :name => "poly_ip_index", :unique => false
|
||||||
add_index :impressions, [:impressionable_type, :impressionable_id, :session_hash], :name => "poly_session_index", :unique => false
|
add_index :impressions, [:impressionable_type, :impressionable_id, :session_hash], :name => "poly_session_index", :unique => false
|
||||||
add_index :impressions, [:controller_name,:action_name,:request_hash], :name => "controlleraction_request_index", :unique => false
|
add_index :impressions, [:controller_name,:action_name,:request_hash], :name => "controlleraction_request_index", :unique => false
|
||||||
add_index :impressions, [:controller_name,:action_name,:ip_address], :name => "controlleraction_ip_index", :unique => false
|
add_index :impressions, [:controller_name,:action_name,:ip_address], :name => "controlleraction_ip_index", :unique => false
|
||||||
add_index :impressions, [:controller_name,:action_name,:session_hash], :name => "controlleraction_session_index", :unique => false
|
add_index :impressions, [:controller_name,:action_name,:session_hash], :name => "controlleraction_session_index", :unique => false
|
||||||
add_index :impressions, :user_id
|
add_index :impressions, :user_id
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.down
|
def self.down
|
||||||
remove_index :impressions, :name => :poly_request_index
|
remove_index :impressions, :name => :poly_request_index
|
||||||
remove_index :impressions, :name => :poly_ip_index
|
remove_index :impressions, :name => :poly_ip_index
|
||||||
remove_index :impressions, :name => :poly_session_index
|
remove_index :impressions, :name => :poly_session_index
|
||||||
remove_index :impressions, :name => :controlleraction_request_index
|
remove_index :impressions, :name => :controlleraction_request_index
|
||||||
remove_index :impressions, :name => :controlleraction_ip_index
|
remove_index :impressions, :name => :controlleraction_ip_index
|
||||||
remove_index :impressions, :name => :controlleraction_session_index
|
remove_index :impressions, :name => :controlleraction_session_index
|
||||||
remove_index :impressions, :user_id
|
remove_index :impressions, :user_id
|
||||||
|
|
||||||
drop_table :impressions
|
drop_table :impressions
|
||||||
end
|
end
|
||||||
end
|
end
|
Loading…
Reference in New Issue