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

Copy-DbaDbTableData - Enable failback to default group #9122

Merged

Conversation

ben-thul
Copy link
Contributor

@ben-thul ben-thul commented Oct 9, 2023

Please read -- recent changes to our repo

On November 10, 2022, we removed some bloat from our repository (for the second and final time). This change requires that all contributors reclone or refork their repo.

PRs from repos that have not been recently reforked or recloned will be closed and @potatoqualitee will cherry-pick your commits and open a new PR with your changes.

  • Please confirm you have the smaller repo (85MB .git directory vs 275MB or 110MB or 185MB .git directory)

Type of Change

  • Bug fix (non-breaking change, fixes #)
  • New feature (non-breaking change, adds functionality, fixes Copy-DbaDbTableData fails when filegroup for target table doesn't exist in destination #9121 )
  • 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

Purpose

Allow copying table with Copy-DbaDbTable where target database does not have a filegroup of the same name as the source table.

Approach

Adds a new switch param that says to use the default filegroup in the target database.

Commands to test

Copy-DbaDbTable

Screenshots

image

@potatoqualitee
Copy link
Member

Thank you! 🎯

@potatoqualitee potatoqualitee changed the title Ben thul/copy table default fg Copy-DbaDbTableData - Enable failback to default group Oct 10, 2023
@potatoqualitee potatoqualitee merged commit 166663b into dataplat:development Oct 10, 2023
3 checks passed
@wsmelton
Copy link
Member

@potatoqualitee for awareness this doesn't address the underlying error that occurs. It will still occur because a switch is false unless provided.

@ben-thul
Copy link
Contributor Author

@wsmelton - that was the behavior that @niphlod requested in the conversation on slack. That is, don't change the current behavior unless the switch is provided; the screenshot above demonstrates that.

@ben-thul ben-thul deleted the ben-thul/CopyTableDefaultFG branch October 10, 2023 17:30
@wsmelton
Copy link
Member

That's all fine but it still doesn't address the fact we want the same name of the file group. Does the message make that clear? Does our doc of this command make that clear?

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.

Copy-DbaDbTableData fails when filegroup for target table doesn't exist in destination
3 participants