Skip to content

Added table schema to Get-DbaDbForeignKey #9685

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

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

pollusb
Copy link
Contributor

@pollusb pollusb commented Jun 4, 2025

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 (Invoke-ManualPester)
  • 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

Purpose

Added table schema to Get-DbaDbForeignKey because it's missing

Approach

Commands to test

Screenshots

Learning

@pollusb
Copy link
Contributor Author

pollusb commented Jun 6, 2025

Can someone help me with this?
What do I now?

@andreasjordan
Copy link
Contributor

AppVayor says:

Describe : Get-DbaDbForeignKey Integration Tests
Context  : Parameters are returned correctly
Name     : It Has the correct default properties
Result   : Failed
Message  : Expected @('ComputerName', 'CreateDate', 'Database', 'DateLastModified', 'ID', 'InstanceName', 'IsChecked', 'IsEnabled', 'Name', 'NotForReplication'), but got @('ComputerName', 'CreateDate', 'Database', 
           'DateLastModified', 'ID', 'InstanceName', 'IsChecked', 'IsEnabled', 'Name', 'NotForReplication').
Describe : Get-DbaDbForeignKey Integration Tests
Context  : Parameters are returned correctly
Name     : It Has the correct properties
Result   : Failed
Message  : Expected @('Columns', 'ComputerName', 'CreateDate', 'Database', 'DatabaseEngineEdition', 'DatabaseEngineType', 'DateLastModified', 'DeleteAction', 'ExecutionManager', 'ExtendedProperties'), but got @('Columns', 
           'ComputerName', 'CreateDate', 'Database', 'DatabaseEngineEdition', 'DatabaseEngineType', 'DateLastModified', 'DeleteAction', 'ExecutionManager', 'ExtendedProperties').

@andreasjordan
Copy link
Contributor

The output of the test does not look correct, but as you have added a new property, you have to add it also in lines 56 and 60 of Get-DbaDbForeignKeys.Tests.ps1.

Copy link
Contributor

@andreasjordan andreasjordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request, looks good.

@pollusb
Copy link
Contributor Author

pollusb commented Jun 17, 2025

Many thanks to you. I hope to contribute more. 😁

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