Setting -TargetMigration with EF core

.net-core ef-migrations entity-framework-core

Question

I am trying to target a previous applied migration using dotnet ef -TargetMigration: {MigrationName}

getting below error

Unrecognized option '-TargetMigration:0'

Is this command has been removed in Entity Framework Core? Is there any alternative for this?

1
2
9/15/2016 2:11:46 PM

Popular Answer

You can use as shown below on the package manager console :

 PM > Update-Database [[-Migration] <String>]

Parameter :

-Migration <String> 
  • Specifies the target migration.

  • If '0', all migrations will be reverted.

  • If omitted, all pending migrations will be applied.
1
9/15/2016 4:22:17 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow