From 72a0d3f90b0f2e72d9ed4ae8391a6deeda026451 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 4 Jan 2024 11:58:15 +0000 Subject: [PATCH] [install] sqlite as the default DB --- core/install.php | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/core/install.php b/core/install.php index b18c14f8..8014bed6 100644 --- a/core/install.php +++ b/core/install.php @@ -114,9 +114,9 @@ function ask_questions() "; } + $db_s = in_array(DatabaseDriverID::SQLITE->value, $drivers) ? '' : ""; $db_m = in_array(DatabaseDriverID::MYSQL->value, $drivers) ? '' : ""; $db_p = in_array(DatabaseDriverID::PGSQL->value, $drivers) ? '' : ""; - $db_s = in_array(DatabaseDriverID::SQLITE->value, $drivers) ? '' : ""; $warn_msg = $warnings ? "

Warnings

".implode("\n

", $warnings) : ""; $err_msg = $errors ? "

Errors

".implode("\n

", $errors) : ""; @@ -132,9 +132,9 @@ function ask_questions() Type: @@ -161,13 +161,9 @@ function ask_questions() return document.querySelectorAll(n); } function update_qs() { - Array.prototype.forEach.call(q('.dbconf'), function(el, i){ - el.style.display = 'none'; - }); + q('.dbconf').forEach(el => el.style.display = 'none'); let seldb = q("#database_type")[0].value || "none"; - Array.prototype.forEach.call(q('.'+seldb), function(el, i){ - el.style.display = null; - }); + q('.'+seldb).forEach(el => el.style.display = null); } @@ -178,8 +174,9 @@ function ask_questions() The username provided must have access to create tables within the database.

- For SQLite the database name will be a filename on disk, relative to - where shimmie was installed. + SQLite with default settings is fine for tens of users with thousands + of images. For thousands of users or millions of images, postgres is + recommended.

Drivers can generally be downloaded with your OS package manager;