summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/Config.php7
-rw-r--r--classes/Db.php2
-rw-r--r--classes/Db_Migrations.php2
3 files changed, 7 insertions, 4 deletions
diff --git a/classes/Config.php b/classes/Config.php
index f8f9aaa18..1921796db 100644
--- a/classes/Config.php
+++ b/classes/Config.php
@@ -18,13 +18,16 @@ class Config {
*
* or config.php:
*
- * putenv('TTRSS_DB_TYPE=pgsql');
+ * putenv('TTRSS_DB_HOST=my-patroni.example.com');
*
* note lack of quotes and spaces before and after "=".
*
*/
- /** database type: pgsql */
+ /** this is kept for backwards/plugin compatibility, the only supported database is PostgreSQL
+ *
+ * @deprecated could be replaced with default (and only) value: `pgsql`
+ */
const DB_TYPE = "DB_TYPE";
/** database server hostname */
diff --git a/classes/Db.php b/classes/Db.php
index 92bbec8b4..6310d11e3 100644
--- a/classes/Db.php
+++ b/classes/Db.php
@@ -27,7 +27,7 @@ class Db {
$db_port = Config::get(Config::DB_PORT) ? ';port=' . Config::get(Config::DB_PORT) : '';
$db_host = Config::get(Config::DB_HOST) ? ';host=' . Config::get(Config::DB_HOST) : '';
- return Config::get(Config::DB_TYPE) . ':dbname=' . Config::get(Config::DB_NAME) . $db_host . $db_port;
+ return 'pgsql:dbname=' . Config::get(Config::DB_NAME) . $db_host . $db_port;
}
// this really shouldn't be used unless a separate PDO connection is needed
diff --git a/classes/Db_Migrations.php b/classes/Db_Migrations.php
index 62619b377..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;