Generate migration script that prints status along the way with EF Core

ef-migrations entity-framework-core

Question

With dotnet ef migrations script I can generate an SQL script that migrates my database to the latest version; with --idempotent I don't even have to care what version it's currently at, since it will check the history table before applying a migration.

However, I can't figure out if there's a way to make it print status along the way. I'd like it to, for example, PRINT that it either applied or skipped a migration (so I know if something was done or not).

Is it possible to generate a script with that feature using dotnet ef migrations script?

1
0
1/12/2018 1:12:37 PM

Popular Answer

You can customize the migrations with Sql() statmenets like

Sql("PRINT 'Success'");
1
1/12/2018 4:41:02 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