title: how can I seed the ID number into my data when using Rails?
body: <p>I am importing some data from an old Omnis 7 databse via a text file into Rails. I am using text files for this purpose and am using db:seed to port it in.</p>
  
  <p>In my seeds.rb file I have:</p>
  
  <pre><code>Port.delete_all
  File.open("db_ports.txt", "r") do |ports|
    ports.read.each_line do |port|
      id, name, un_locode, bunker_surcharge, launch_tariff  = port.chomp.split("|")
      Port.create!(:id =&gt; id, :name =&gt; name, :un_locode =&gt; un_locode, :bunker_surcharge =&gt; bunker_surcharge, :launch_tariff =&gt; launch_tariff)
    end
  end
  </code></pre>
  
  <p>I would like to have the ID number be the one as was assigned in the other database because Berths have a foreign key that looks to Ports and I would need those to match up with each other.</p>
  
  <p>However, when I last imported my data, this didn't work out as planned and the ID number was not passed in. I'm guessing that I could create empty records which I  would then update with the data but was wondering whether this was possible.</p>