Reputation: 60664
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
?
Upvotes: 0
Views: 407
Reputation: 41799
You can customize the migrations with Sql() statmenets like
Sql("PRINT 'Success'");
Upvotes: 1