dbatools icon indicating copy to clipboard operation
dbatools copied to clipboard

Added table schema to Get-DbaDbForeignKey

Open pollusb opened this issue 6 months ago • 3 comments

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 avatar Jun 04 '25 19:06 pollusb

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

pollusb avatar Jun 06 '25 15:06 pollusb

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 avatar Jun 10 '25 17:06 andreasjordan

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.

andreasjordan avatar Jun 10 '25 17:06 andreasjordan

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

pollusb avatar Jun 17 '25 13:06 pollusb

Do I need to do anything when "Merging is blocked" ? You're not authorized to push to this branch

pollusb avatar Jun 25 '25 22:06 pollusb

No, there is nothing you can do.

Next step is a second review by one of the core contributors who can merge to the development branch (@potatoqualitee / @jpomfret). They will then merge your changes and later publish a new release.

andreasjordan avatar Jun 26 '25 06:06 andreasjordan

Thank you @pollusb for your contribution! (and thank you @andreasjordan as always!)

jpomfret avatar Jun 26 '25 07:06 jpomfret