Fix conflicts
This commit is contained in:
56
db/migrate/20150804144230_create_visits.rb
Normal file
56
db/migrate/20150804144230_create_visits.rb
Normal file
@@ -0,0 +1,56 @@
|
||||
class CreateVisits < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :visits, id: false do |t|
|
||||
t.uuid :id, default: nil, primary_key: true
|
||||
t.uuid :visitor_id, default: nil
|
||||
|
||||
# the rest are recommended but optional
|
||||
# simply remove the columns you don't want
|
||||
|
||||
# standard
|
||||
t.string :ip
|
||||
t.text :user_agent
|
||||
t.text :referrer
|
||||
t.text :landing_page
|
||||
|
||||
# user
|
||||
t.integer :user_id
|
||||
# add t.string :user_type if polymorphic
|
||||
|
||||
# traffic source
|
||||
t.string :referring_domain
|
||||
t.string :search_keyword
|
||||
|
||||
# technology
|
||||
t.string :browser
|
||||
t.string :os
|
||||
t.string :device_type
|
||||
t.integer :screen_height
|
||||
t.integer :screen_width
|
||||
|
||||
# location
|
||||
t.string :country
|
||||
t.string :region
|
||||
t.string :city
|
||||
t.string :postal_code
|
||||
t.decimal :latitude
|
||||
t.decimal :longitude
|
||||
|
||||
# utm parameters
|
||||
t.string :utm_source
|
||||
t.string :utm_medium
|
||||
t.string :utm_term
|
||||
t.string :utm_content
|
||||
t.string :utm_campaign
|
||||
|
||||
# native apps
|
||||
# t.string :platform
|
||||
# t.string :app_version
|
||||
# t.string :os_version
|
||||
|
||||
t.timestamp :started_at
|
||||
end
|
||||
|
||||
add_index :visits, [:user_id]
|
||||
end
|
||||
end
|
||||
20
db/migrate/20150804144231_create_ahoy_events.rb
Normal file
20
db/migrate/20150804144231_create_ahoy_events.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
class CreateAhoyEvents < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :ahoy_events, id: false do |t|
|
||||
t.uuid :id, default: nil, primary_key: true
|
||||
t.uuid :visit_id, default: nil
|
||||
|
||||
# user
|
||||
t.integer :user_id
|
||||
# add t.string :user_type if polymorphic
|
||||
|
||||
t.string :name
|
||||
t.jsonb :properties
|
||||
t.timestamp :time
|
||||
end
|
||||
|
||||
add_index :ahoy_events, [:visit_id]
|
||||
add_index :ahoy_events, [:user_id]
|
||||
add_index :ahoy_events, [:time]
|
||||
end
|
||||
end
|
||||
5
db/migrate/20150808100936_add_ip_to_ahoy_event.rb
Normal file
5
db/migrate/20150808100936_add_ip_to_ahoy_event.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddIpToAhoyEvent < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :ahoy_events, :ip, :string
|
||||
end
|
||||
end
|
||||
5
db/migrate/20150808102442_add_visit_id_to_debate.rb
Normal file
5
db/migrate/20150808102442_add_visit_id_to_debate.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddVisitIdToDebate < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :debates, :visit_id, :string
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user