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

New-DbaDbSnapshot - Support special characters in database name #8830

Merged
merged 3 commits into from
Apr 1, 2023

Conversation

niphlod
Copy link
Contributor

@niphlod niphlod commented Mar 29, 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-DbaDbSnapshot allows creating only one snapshot if database name contains a dot #8829 )
  • 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

Purpose

Allow multiple snaps for db names with dot in it

Approach

Re-add extension to the filename before invoking changeextension.
Before "test.test_20230329_220615_0752_001" --> "test.ss"
Now "test.test_20230329_220615_0752_001.mdf" --> "test.test.20230329_220615_0752_001.ss"

Added a regression test to the test-suite.
And thanks to @itb-devs-de for reporting

@wsmelton wsmelton changed the title fixes #8829 New-DbaDbSnapshot - Support special characters in database name Mar 29, 2023
create db for new regr test (do Snap)
quote db creation for regr test (do Snap)
@potatoqualitee
Copy link
Member

Thank you for the tests 🙇🏼

@potatoqualitee potatoqualitee merged commit d028d01 into dataplat:development Apr 1, 2023
@niphlod niphlod deleted the fix/8829 branch October 17, 2024 19:40
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.

New-DbaDbSnapshot allows creating only one snapshot if database name contains a dot
3 participants