Move foreign_key creation to create_table statement on CreateGeoEventLog

parent 4a2774d4
......@@ -5,8 +5,8 @@ class CreateGeoEventLog < ActiveRecord::Migration
create_table :geo_event_log do |t|
t.datetime :created_at, index: true, null: false
t.integer :push_event_id, index: true
end
add_foreign_key :geo_event_log, :geo_push_events, column: :push_event_id, on_delete: :cascade # rubocop: disable Migration/AddConcurrentForeignKey
t.foreign_key :geo_push_events, column: :push_event_id, on_delete: :cascade
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment