title: How to get flyway to re-run migration?
body: <p><strong>OUR SYSTEM</strong></p>
  
  <p>We are trying to put migrations as .sql files under version control.  Developers would write a VN__*.sql file, commit to version control and a job that runs every 5 minutes would automatically migrate to a Dev and Test database.  Once the change proved to not cause problems, someone else would run a manual job to run the migration on Production.</p>
  
  <p><strong>MY PROBLEM:</strong></p>
  
  <p>I had a demo migration that created a few tables. I checked V4__DemoTables.sql into version control on my PC.</p>
  
  <p>On our Linux box a job that runs every 5 minutes extracted the new file from version control, then ran the flyway.sh file.  It detected the file and executed it.</p>
  
  <p>But the .sql file had a typo.  And we are using Neteeza which has problems with flyway automatically wrapping a migration in a BEGIN TRAN ... END TRAN.  So the migration created 2 tables, then aborted before the third.</p>
  
  <p>No problem I thought. I dropped the 2 tables that the .sql file did create.  Checked V4__ out of version control, fixed the typo and re-submitted it.</p>
  
  <p>Five minutes later the update was extracted but flyway complains that the checksum does not match. So it will NOT run the updated V4__DemoTables.sql file.</p>
  
  <p><strong>How do I get flyway to accept the updated file and update the checksum in the SCHEMA_VERSION file in case of a typo?</strong></p>
  
  <p>Reading the docs it seems like the developers suggest I should have created a new V4_1_DemoTables.sql file with the fix's.  But this would have collided with the commands in the V4__ file so this seemed wrong.</p>
  
  <p>So here is what the docs imply I need to do:</p>
  
  <ul>
  <li><p>Leave V4__ as a 'successful' migration according to the
  SCHEMA_VERSION table.</p>
  
  <p>Create V4_1_ to delete the tables that were created before the typo
  line in V4__.</p>
  
  <p>Create V4_2_ which has the typo fix from the original file to do all
  the real work.</p></li>
  </ul>
  
  <p>Is this correct?</p>