aboutsummaryrefslogtreecommitdiff
path: root/classes/Db_Migrations.php
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2025-04-28 04:48:01 +0000
committerAndrew Dolgov <fox@fakecake.org>2025-04-28 04:48:01 +0000
commit4cb8a84df46d46bc325b6638defbdc4dc34151ed (patch)
tree77acdf9b8271568a53e636fc4e84d4bda1404f82 /classes/Db_Migrations.php
parent0e4b8bd6538f3062d34a3a06ab5531c70042de78 (diff)
parentf80187e05f12c2fe9c487bff13058b207833b227 (diff)
Merge branch 'rip-mysql' into 'master'
initial attempt to remove mysql-related stuff from tt-rss See merge request tt-rss/tt-rss!120
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);