Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EF Migration migrate to 0 call initial creates down

I'm trying to figure out the syntax to bring migrations down to an empty database as in call the down method on the inital create migration. Does anyone know the proper syntax to call the Down method in a migration something akin to this:

Update-Database -StartupProjectName "Infrastructure.Data" -TargetMigration 0
like image 247
maxfridbe Avatar asked Dec 13 '22 03:12

maxfridbe


1 Answers

update-database -startupproject someproject -targetmigration 0

That will bring you back to a completely empty database.

I assembled a complete reference to the package manager commands for ef migrations.

like image 132
Anders Abel Avatar answered Dec 14 '22 16:12

Anders Abel