summaryrefslogtreecommitdiff
path: root/classes/Db_Migrations.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/Db_Migrations.php')
-rw-r--r--classes/Db_Migrations.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/classes/Db_Migrations.php b/classes/Db_Migrations.php
index 7dcfc24b1..33bc64a32 100644
--- a/classes/Db_Migrations.php
+++ b/classes/Db_Migrations.php
@@ -23,7 +23,7 @@ class Db_Migrations {
}
function initialize(string $root_path, string $migrations_table, bool $base_is_latest = true, int $max_version_override = 0): void {
- $this->base_path = "$root_path/" . Config::get(Config::DB_TYPE);
+ $this->base_path = "$root_path/pgsql";
$this->migrations_path = $this->base_path . "/migrations";
$this->migrations_table = $migrations_table;
$this->base_is_latest = $base_is_latest;
@@ -88,9 +88,7 @@ class Db_Migrations {
$lines = $this->get_lines($version);
if (count($lines) > 0) {
- // mysql doesn't support transactions for DDL statements
- if (Config::get(Config::DB_TYPE) != "mysql")
- $this->pdo->beginTransaction();
+ $this->pdo->beginTransaction();
foreach ($lines as $line) {
Debug::log($line, Debug::LOG_EXTENDED);
@@ -107,8 +105,7 @@ class Db_Migrations {
else
$this->set_version($version);
- if (Config::get(Config::DB_TYPE) != "mysql")
- $this->pdo->commit();
+ $this->pdo->commit();
Debug::log("Migration finished, current version: " . $this->get_version(), Debug::LOG_VERBOSE);