Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Support special characters in migration table name #110

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

YetiCGN commented Feb 25, 2013

Support special characters in migration table name like "!Migration_Versions". This is useful when the database contains hundreds of tables and one wants the migration versions table to be at the first position.

@stof stof commented on the diff Feb 25, 2013

...trine/DBAL/Migrations/Configuration/Configuration.php
@@ -368,7 +368,7 @@ public function hasVersionMigrated(Version $version)
{
$this->createMigrationTable();
- $version = $this->connection->fetchColumn("SELECT version FROM " . $this->migrationsTableName . " WHERE version = ?", array($version->getVersion()));
+ $version = $this->connection->fetchColumn("SELECT version FROM `" . $this->migrationsTableName . "` WHERE version = ?", array($version->getVersion()));
@stof

stof Feb 25, 2013

Member

This is wrong. ``` is not a cross-platform escaping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment