title: Rails migration, references `unique: true` isn't generating `unique: true` in schema causing constancy_fail check to fail
body: <p>I have the following migration</p>
  
  <pre><code>class CreateBooking &lt; ActiveRecord::Migration[5.1]
    def change
      create_table :bookings do |t|
        t.integer :day_period, default: 0
        t.references :service, foreign_key: true, unique: true, dependent: :destroy, index: true
      end
    end
  end
  </code></pre>
  
  <p>and it generates the following schema:</p>
  
  <pre><code>  create_table "bookings", force: :cascade do |t|
      t.integer "day_period", default: 0
      t.bigint "service_id"
      t.index ["service_id"], name: "index_bookings_on_service_id"
    end
  </code></pre>
  
  <p>When I run guard which runs a <code>consistency_fail</code> test which fails with: </p>
  
  <pre><code>There are calls to has_one that aren't backed by unique indexes.
  ----------------------------------------------------------------
  Model          Table Columns
  ----------------------------------------------------------------
  Service  bookings (service_id)
  ----------------------------------------------------------------
  </code></pre>
  
  <p>Now originally I didn't have <code>unique: true</code> but I rolled back and added it in, still the same problem, again, didn't have <code>index: true</code> so I rolled back and added that in and still the same problem.</p>
  
  <p>I think it's becuase <code>service_id</code> in the schema doesn't have <code>unique: true</code> on it but I don't know and I can't find any information on my specific problem.</p>
  
  <p>What causes this problem, what am I doing that is causing this problem and what can I do to stop this problem, given the current migration?</p>