Skip to content

Commit

Permalink
updating Invoke-DbaDbUpgrade for dataplat#5047
Browse files Browse the repository at this point in the history
this fixes dataplat#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 59a65b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/Invoke-DbaDbUpgrade.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 59a65b4

Please sign in to comment.