mirror of
https://github.com/DBDiff/DBDiff.git
synced 2026-04-25 13:25:49 +03:00
[GH-ISSUE #79] Database Names with Hyphens cause the error "Can't connect to target database" #55
Labels
No labels
bug
enhancement
good first issue
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/DBDiff#55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @iocron on GitHub (Jun 19, 2018).
Original GitHub issue: https://github.com/DBDiff/DBDiff/issues/79
If there are hyphens (-) in the database name, then the error "Can't connect to target database" appears otherwise not. For example: ./dbdiff --output="./migrations/today.sql" server1.my-database1:server2.my-database2
@IncubuzzCC commented on GitHub (Jul 2, 2018):
I had the same issue and created a fix for this issue.
https://github.com/DBDiff/DBDiff/pull/80
The changes are visible in my fork:
https://github.com/pddm/DBDiff/blob/master/src/DB/Data/LocalTableData.php
@IncubuzzCC commented on GitHub (Jul 4, 2020):
There is an improved fix for this issue, which also escapes table names presenting similar issues:
fix(SQL): Escape Database Names
#92 opened on May 19, 2019 by janfa