I am wondering if there is a way to run Update-Database
from the Package Manager Console with something similar to the Rails --dry-run
flag, in order to see what will be run before doing it. My googling has led to no corresponding command for EF.
Is there one? Is there a hack to do essentially the same thing?
You could use Update-Database
with a -Script
flag to generate a SQL script instead of applying the migration. If you don't specify a source migration, it will use the current database state as the starting point, so you can use the file to verify what would have been executed on the database.
https://msdn.microsoft.com/en-us/data/jj591621.aspx#script
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With