|
|
|
@ -82,6 +82,8 @@ class Db_Migrations {
|
|
|
|
|
else
|
|
|
|
|
Debug::log("Starting migration to $version...", Debug::LOG_VERBOSE);
|
|
|
|
|
|
|
|
|
|
// mysql doesn't support transactions for DDL statements
|
|
|
|
|
if (Config::get(Config::DB_TYPE) != "mysql")
|
|
|
|
|
$this->pdo->beginTransaction();
|
|
|
|
|
|
|
|
|
|
foreach ($this->get_lines($version) as $line) {
|
|
|
|
@ -99,7 +101,9 @@ class Db_Migrations {
|
|
|
|
|
else
|
|
|
|
|
$this->set_version($version);
|
|
|
|
|
|
|
|
|
|
if (Config::get(Config::DB_TYPE) != "mysql")
|
|
|
|
|
$this->pdo->commit();
|
|
|
|
|
|
|
|
|
|
Debug::log("Migration finished, current version: " . $this->get_version(), Debug::LOG_VERBOSE);
|
|
|
|
|
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|