Migrations have both Up and Down . You can always remake your application by breaking the migration down, and then adding a new migration. The Down process does not change your model, but only changes in the database. Use Update-Database -Target:migrationTargetName or Update-Database -TargetMigration:migrationNumber .
If you want to perform a migration that starts without a database and ends with the current model, you can delete all migrations using Update-Database -TargetMigration:0 . It is a good idea to demolish the database and then run Update-Database as a test to verify that the database changes are in sync.
Remember, if you break your migrations to 0 , and then run Add-Migration , you will need to look very carefully at the generated scaffold, as it will probably be significantly different from incremental changes.
Claies
source share