EF Code First Migrations - how does it remember the last model change and how do you reset it?
===

So i'm using Entity Framework Code First Migrations.

I make a change to my model, add a new manual migration and it gets the up script wrong.

So I delete the migration, and at the same time that I am not going to change it the way I thought. Upon deletion of the migration class and a reset of the model (ie setting it back as it was) I then change my model again.

When I generate a new migration, this migration acts as If it is changing from the one that I deleted.

how does entity framework code first know the last model state if you clean and delete a migration?

And how do you reset this?