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

Handle database with escapable identifiers in name #717

Merged
merged 3 commits into from
May 9, 2024

Commits on May 7, 2024

  1. Quote database name in case of illegal characters

    In MySQL a hyphen (-) in a database name is not prohibited but requires the name to be escaped with backtick (`).
    
    The methods setConnection() and createDatabase() passed the database name unaltered which caused migrations to fail for systems with hyphens in the database name.
    
    This change wraps the database name in quoteTableName(), and also identified a couple other cases where the name should be or was inconsistently quoted.
    jharder committed May 7, 2024
    Configuration menu
    Copy the full SHA
    7d27f0e View commit details
    Browse the repository at this point in the history
  2. Add test for database with hyphen in name

    Adding a test case to cover databases with hyphen in its name.
    jharder committed May 7, 2024
    Configuration menu
    Copy the full SHA
    c34e8e5 View commit details
    Browse the repository at this point in the history
  3. Remove quote marks in SQL

    Looks like the TABLE_SCHEMA was being quoted already, so this double-quoted and caused some tests to fail.
    jharder committed May 7, 2024
    Configuration menu
    Copy the full SHA
    9521d4b View commit details
    Browse the repository at this point in the history