Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set-DbaDbCompatbility - Fix for using piped input and don't trust master compatibility level #9146

Merged
merged 2 commits into from
Nov 5, 2023

Conversation

andreasjordan
Copy link
Contributor

Type of Change

  • Bug fix (non-breaking change, fixes # )
  • New feature (non-breaking change, adds functionality, fixes # )
  • Breaking change (affects multiple commands or functionality, fixes # )
  • Ran manual Pester test and has passed (.\tests\manual.pester.ps1)
  • Adding code coverage to existing functionality
  • Pester test is included
  • If new file reference added for test, has is been added to github.com/dataplat/appveyor-lab ?
  • Unit test is included
  • Documentation
  • Build system

Experienced this bug today at a client wihle doing Get-DbaDatabase -SqlInstance sql01 | Where-Object Name -like Test* | Set-DbaDbCompatibility.

If we support pipeline input, we must not use $SqlInstance. And every database can be on a different server with a different server level. So we can only get the server level inside of the loop for every individual database. And I used the same method to get the server level like in Test-DbaDbCompatibility (see #8992 for details).

@potatoqualitee
Copy link
Member

solid change 💪🏼

@potatoqualitee potatoqualitee merged commit 368ea57 into development Nov 5, 2023
11 checks passed
@potatoqualitee potatoqualitee deleted the SetDbaDbCompatibility branch November 5, 2023 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants