title: How to reset auto increment field in a ActiveRecord migration?
body: <p>In my migration I have:</p>
  
  <pre><code>def up
     MyModel.destroy_all
     MyModel.create!({:id=&gt;1,:name=&gt;'foo'})
     MyModel.create!({:id=&gt;2,:name=&gt;'fooBar'})
     MyModel.create!({:id=&gt;3,:name=&gt;'fooNull'})
  end
  </code></pre>
  
  <p>because I need to override data that was already on my_models table</p>
  
  <p>But Even though I'm specifying the <code>id</code> on MySQL it continues the numbering from the position it already was.</p>
  
  <p>I need to rest the counter on the auto increment for <code>id</code> to have only this 3 new records with that id values trough Active Record migration on my Ruby on Rails application. </p>