title: Rails db:seed doesn't create records when foreign key is a large number
body: <p>I'm trying to populate a mysql2 database and not all records are being added into the database. </p>
  
  <p>This is my schema</p>
  
  <pre><code>create_table "accounts", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
    t.string "name_es"
    t.string "name_en"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.integer "dbid"  
  
  create_table "company_account_categories", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
    t.integer "company_type"
    t.integer "account_id"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["account_id"], name: "index_company_account_categories_on_account_id"
  
  add_foreign_key "company_account_categories", "accounts"
  </code></pre>
  
  <p>In my seeds I have CompanyAccountCategory records with account_id between 101 and 177 which all get wrote into the DB, while records with account_id 22077 or greater are not. </p>
  
  <p>Example:</p>
  
  <pre><code>CompanyAccountCategory.find_or_create_by(account_id: 176, company_type: 4)
  CompanyAccountCategory.find_or_create_by(account_id: 22133, company_type: 1)
  </code></pre>