cakephp / phinx

PHP Database Migrations for Everyone
https://phinx.org
MIT License
4.45k stars 895 forks source link

Fix quoting DB name when creating/dropping #2286

Closed MasterOdin closed 2 months ago

MasterOdin commented 2 months ago

Port of https://github.com/cakephp/migrations/pull/717 to phinx which fixed using values that needed being escaped for mysql, but did not fix it for postgres or sqlserver.

I think there is still issues in some other places the DB name can be referenced in being quoted, but they're used within WHERE clauses within a SQL statement, and the fix there is to rework the queries to be parameterized vs using sprintf, which can be done in a follow-up PR.