title: How do I handle auto incrementing primary keys during migration
body: <pre><code>create table foo (id auto increment primary key, name varchar(255))
  </code></pre>
  
  <p>I wrote a simple rails migration script which creates a new record on <code>self.up</code> and drops it on <code>self.drop</code> with <code>delete(:id =&gt; 1)</code>. If I perform db:migrate it creates a new entry with id=1 and if I rollback it gets removed. The problem occurs if I migrate / drop again as the record gets created with primary key id=2 and my drop script fails on a rollback.</p>
  
  <p>It is very important that the primary key is the same every time as I have other dependencies based on that. What should be the right way to handle this.</p>