Permalink
Browse files

updating Invoke-DbaDbUpgrade for #5047

this fixes #5047 by checking if each object is in the array instead of containing the array. Also applied to the ExcludeDatabase option
  • Loading branch information...
tkwj committed Feb 9, 2019
1 parent 1d9f8f9 commit 59a65b42f95c66c008045d9ffb271d364c47b55c
Showing with 2 additions and 2 deletions.
  1. +2 −2 functions/Invoke-DbaDbUpgrade.ps1
@@ -134,10 +134,10 @@ function Invoke-DbaDbUpgrade {

$InputObject = $InputObject | Where-Object { $_.IsSystemObject -eq $false }
if ($Database) {
$InputObject = $InputObject | Where-Object { $_.Name -contains $Database }
$InputObject = $InputObject | Where-Object Name -In $Database
}
if ($ExcludeDatabase) {
$InputObject = $InputObject | Where-Object { $_.Name -notcontains $ExcludeDatabase }
$InputObject = $InputObject | Where-Object Name -NotIn $ExcludeDatabase
}

foreach ($db in $InputObject) {

0 comments on commit 59a65b4

Please sign in to comment.