title: Entity Framework Code First Revert Database to empty
body: <p>I've tried using Entity Framework Code First and set <code>AutomaticMigrationsEnabled</code> to true so that when I change the model classes the database would automatically update.</p>
  
  <p>Then I have a table, where I added length to one field. Example
  <code>Employee.Firstname(50)</code> -> <code>Employee.Firstname(100)</code>. The updated was successful.</p>
  
  <p>But I have entered wrong data so I want to reset the database so I execute:</p>
  
  <pre><code>update-database -targetmigration:"0" -force -verbose
  </code></pre>
  
  <p>But I got the ff error:<br />
  <code>System.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated.</code></p>
  
  <p>Currently, my solution is to delete all the tables in the database manually as well as delete all the records in <code>__MigrationHistory</code>, then reinstall the <code>EntityFramework.Migrations</code> via NuGet.</p>
  
  <p>Is there an easy way to do it?</p>