Skip to content

New-DbaDbTable - Handle bracket-quoted names and two-part names#10279

Open
andreasjordan wants to merge 1 commit intodevelopmentfrom
claude/issue-8337-20260321-1606
Open

New-DbaDbTable - Handle bracket-quoted names and two-part names#10279
andreasjordan wants to merge 1 commit intodevelopmentfrom
claude/issue-8337-20260321-1606

Conversation

@andreasjordan
Copy link
Collaborator

Fixes #8337

Parse the -Name parameter using Get-ObjectNameParts so that bracket-quoted names like [table] are stripped of brackets, and two-part names like [schema].[table] are split into schema and table components.

This brings New-DbaDbTable in line with Get-DbaDbTable which already handles these cases via Get-ObjectNameParts.

Generated with Claude Code

Parse the -Name parameter using Get-ObjectNameParts so that bracket-quoted
names like [table] are stripped of brackets, and two-part names like
[schema].[table] are split into their respective schema and table components.
This brings New-DbaDbTable in line with Get-DbaDbTable which already handles
these cases.

Fixes #8337

(do New-DbaDbTable)

Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>
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-DbaDbTable doesn't validate table names or work with two part names

1 participant