Skip to content

Conversation

@dereuromark
Copy link
Member

@dereuromark dereuromark commented Jan 19, 2026

Summary

  • MySQL adapter properly quotes database names in createDatabase() and dropDatabase() using quoteTableName(), but PostgreSQL and SQL Server did not quote these identifiers consistently.

PostgreSQL fixes:

  • createDatabase(): Use quoteSchemaName() for database name and quoteString() for charset encoding
  • dropDatabase(): Use quoteSchemaName() for database name

SQL Server fixes:

  • createDatabase(): Use quoteSchemaName() for database name and collation instead of manual [brackets]
  • dropDatabase(): Replace heredoc with sprintf using quoteSchemaName() for identifiers and quoteString() for string comparisons

Docblock fixes:

  • Fix @params typo to @param in BaseMigration.php foreignKey() and index() methods
  • Fix copy-paste docblock errors in 7 test seed files where "NumbersSeed seed" was incorrectly used

This ensures consistent identifier quoting across all database adapters and fixes documentation errors.

Test plan

  • PHPStan passes
  • PHPCS passes
  • Existing tests pass

MySQL adapter properly quotes database names in createDatabase/dropDatabase
using quoteTableName(), but PostgreSQL and SQL Server did not.

- PostgreSQL: Use quoteSchemaName() for database name and quoteString() for charset
- SQL Server: Use quoteSchemaName() for database name and quoteString() for string comparisons

This ensures consistent identifier quoting across all database adapters.
- Fix @params typo to @param in BaseMigration.php foreignKey() and index() methods
- Fix copy-paste docblock errors in test seed files where "NumbersSeed seed" was
  used for classes with different names
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.

2 participants