title: Seeds file - adding id column to existing data
body: <p>My seeds file populated the countries table with a list of countries.  But now it needs to be changed to hard-code the id (instead of rails generating the id column for me).</p>
  
  <p>I added the id column and values as per below:</p>
  
  <pre><code> zmb: {id: 103,code: 'ZMB', name: Country.human_attribute_name(:zambia, default: 'Error!'), display_order: nil, create_user: user, update_user: user, eff_date: Time.now, exp_date: default_exp_date},
      skn: {id: 104,code: 'SKN', name: Country.human_attribute_name(:st_kitts_and_nevis, default: 'Error!'), display_order: nil, create_user: user, update_user: user, eff_date: Time.now, exp_date: default_exp_date}
  
  countries.each { |key, value| countries_for_later[key] = Country.find_or_initialize_by(id: value[:id]); countries_for_later[key].assign_attributes(value); countries_for_later[key].save!; }
  </code></pre>
  
  <p>Above it just a snippet.  I have added an id: for every country.</p>
  
  <p>But when I run <code>db:seed</code> I get the following error:</p>
  
  <pre><code>ActiveRecord::RecordInvalid: Validation failed: Code has already been taken
  </code></pre>
  
  <p>I am new to rails so I'm not sure what is causing this - is it because the ID column already exists in the database?</p>