Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Labels:None
Description
Today I have started with implemention migrations in my project.
But I found that only MySQL supported.
/**
* Returns the current migrated version from the versions table.
*
* @return bool $currentVersion
*/
public function getCurrentVersion()
{
$this->createMigrationTable();
$result = $this->connection->fetchColumn("SELECT version FROM " . $this->migrationsTableName . " ORDER BY version DESC LIMIT 1");
return $result !== false ? (string) $result : '0';
}
In my project I use MSSQL db.
Do you plan to use platform independent solution?
Seem this is already been fixed:
$sql = "SELECT version FROM " . $this->migrationsTableName . " ORDER BY version DESC";
$sql = $this->connection->getDatabasePlatform()->modifyLimitQuery($sql, 1);
$result = $this->connection->fetchColumn($sql);
return $result !== false ? (string) $result : '0';
You can skip my PR-52, if you want since. My plan was to fix it with the query builder