diff --git a/db/migrate/20140623100942_create_visits.rb b/db/migrate/20140623100942_create_visits.rb index ca5e325b..561fa177 100644 --- a/db/migrate/20140623100942_create_visits.rb +++ b/db/migrate/20140623100942_create_visits.rb @@ -1,7 +1,6 @@ class CreateVisits < ActiveRecord::Migration def change - create_table :visits, id: false do |t| - t.uuid :id, primary_key: true + create_table :visits do |t| t.uuid :visitor_id # the rest are recommended but optional diff --git a/db/migrate/20140623101032_create_ahoy_events.rb b/db/migrate/20140623101032_create_ahoy_events.rb index de6a5205..c865a59c 100644 --- a/db/migrate/20140623101032_create_ahoy_events.rb +++ b/db/migrate/20140623101032_create_ahoy_events.rb @@ -1,20 +1,17 @@ class CreateAhoyEvents < ActiveRecord::Migration def change - create_table :ahoy_events, id: false do |t| - t.uuid :id, primary_key: true + create_table :ahoy_events do |t| t.uuid :visit_id - # user t.integer :user_id # add t.string :user_type if polymorphic - t.string :name t.text :properties t.timestamp :time end - add_index :ahoy_events, [:visit_id] - add_index :ahoy_events, [:user_id] - add_index :ahoy_events, [:time] + add_index :ahoy_events, :visit_id + add_index :ahoy_events, :user_id + add_index :ahoy_events, :time end end diff --git a/db/schema.rb b/db/schema.rb index a58e424c..4e1a18ad 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20140626123837) do +ActiveRecord::Schema.define(version: 20140627165718) do create_table "ahoy_events", force: true do |t| t.uuid "visit_id" @@ -21,7 +21,6 @@ ActiveRecord::Schema.define(version: 20140626123837) do t.datetime "time" end -# add_index "ahoy_events", ["id"], name: "sqlite_autoindex_ahoy_events_1", unique: true add_index "ahoy_events", ["time"], name: "index_ahoy_events_on_time" add_index "ahoy_events", ["user_id"], name: "index_ahoy_events_on_user_id" add_index "ahoy_events", ["visit_id"], name: "index_ahoy_events_on_visit_id" @@ -113,13 +112,13 @@ ActiveRecord::Schema.define(version: 20140626123837) do t.string "facebook_url" t.string "google_url" t.text "lodging_description" + t.boolean "make_conference_public", default: false t.boolean "include_registrations_in_splash", default: false t.boolean "include_sponsors_in_splash", default: false t.boolean "include_tracks_in_splash", default: false t.boolean "include_tickets_in_splash", default: false t.boolean "include_social_media_in_splash", default: false t.boolean "include_program_in_splash", default: false - t.boolean "make_conference_public", default: false t.string "banner_photo_file_name" t.string "banner_photo_content_type" t.integer "banner_photo_file_size" @@ -305,8 +304,8 @@ ActiveRecord::Schema.define(version: 20140626123837) do t.text "other_special_needs" t.boolean "attended", default: false t.boolean "volunteer" - t.integer "week" t.integer "user_id" + t.integer "week" end create_table "registrations_social_events", id: false, force: true do |t| @@ -503,7 +502,6 @@ ActiveRecord::Schema.define(version: 20140626123837) do t.datetime "started_at" end -# add_index "visits", ["id"], name: "sqlite_autoindex_visits_1", unique: true add_index "visits", ["user_id"], name: "index_visits_on_user_id" create_table "votes", force: true do |t|