efcore icon indicating copy to clipboard operation
efcore copied to clipboard

Tools: Add -WhatIf parameter to Update-Database

Open bricelam opened this issue 9 years ago • 4 comments

This would show the migrations that would be applied to the database.

This functionality is also related to #577.

bricelam avatar Mar 06 '15 19:03 bricelam

Maybe --dry-run ? (see here)

glen-84 avatar May 22 '15 14:05 glen-84

-WhatIf is a first-class concept in PowerShell. We could consider using --dry-run in the DNX (and Console) commands, but I think there is more value in using a common language between the different interfaces.

bricelam avatar May 22 '15 15:05 bricelam

Ah, okay, I didn't know about that. It's a bit of an odd name. :smile:

I think the DNX commands use lower or possibly camelCase, so I guess it'll be --whatif, --what-if, or --whatIf.

glen-84 avatar May 22 '15 17:05 glen-84

+1 this would be so useful. Also agree with using the -WhatIf (even if in lowercase) as its familiar from PowerShell.

matt-goldman avatar Jan 19 '21 22:01 matt-goldman

bicep also uses what-if as the syntax for this

stap123 avatar Oct 14 '22 17:10 stap123

Hello, any updates?

aunikitin avatar Sep 29 '23 07:09 aunikitin

No updates. Today you can use Get-Migration to see which migrations are pending and Script-Migration to see the SQL they'll generate.

bricelam avatar Sep 29 '23 17:09 bricelam