From 364be554125fe44c83b3fb62705d6d11829867c5 Mon Sep 17 00:00:00 2001 From: AEtherC0r3 Date: Sat, 18 Nov 2017 13:41:11 +0200 Subject: [PATCH] Change visit_id type of ahoy_events to integer The id column of the visits table is of type integer --- ...8113113_change_visit_id_type_of_ahoy_events_to_integer.rb | 5 +++++ db/schema.rb | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20171118113113_change_visit_id_type_of_ahoy_events_to_integer.rb diff --git a/db/migrate/20171118113113_change_visit_id_type_of_ahoy_events_to_integer.rb b/db/migrate/20171118113113_change_visit_id_type_of_ahoy_events_to_integer.rb new file mode 100644 index 00000000..61415970 --- /dev/null +++ b/db/migrate/20171118113113_change_visit_id_type_of_ahoy_events_to_integer.rb @@ -0,0 +1,5 @@ +class ChangeVisitIdTypeOfAhoyEventsToInteger < ActiveRecord::Migration[5.0] + def change + change_column :ahoy_events, :visit_id, :integer, limit: nil + end +end diff --git a/db/schema.rb b/db/schema.rb index 844b5880..de53720a 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,10 +10,10 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170924190528) do +ActiveRecord::Schema.define(version: 20171118113113) do create_table "ahoy_events", force: :cascade do |t| - t.binary "visit_id", limit: 16 + t.integer "visit_id" t.integer "user_id" t.string "name" t.text "properties"