[install] sqlite as the default DB
This commit is contained in:
parent
96f7293c71
commit
72a0d3f90b
1 changed files with 8 additions and 11 deletions
|
@ -114,9 +114,9 @@ function ask_questions()
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$db_s = in_array(DatabaseDriverID::SQLITE->value, $drivers) ? '<option value="'. DatabaseDriverID::SQLITE->value .'">SQLite</option>' : "";
|
||||||
$db_m = in_array(DatabaseDriverID::MYSQL->value, $drivers) ? '<option value="'. DatabaseDriverID::MYSQL->value .'">MySQL</option>' : "";
|
$db_m = in_array(DatabaseDriverID::MYSQL->value, $drivers) ? '<option value="'. DatabaseDriverID::MYSQL->value .'">MySQL</option>' : "";
|
||||||
$db_p = in_array(DatabaseDriverID::PGSQL->value, $drivers) ? '<option value="'. DatabaseDriverID::PGSQL->value .'">PostgreSQL</option>' : "";
|
$db_p = in_array(DatabaseDriverID::PGSQL->value, $drivers) ? '<option value="'. DatabaseDriverID::PGSQL->value .'">PostgreSQL</option>' : "";
|
||||||
$db_s = in_array(DatabaseDriverID::SQLITE->value, $drivers) ? '<option value="'. DatabaseDriverID::SQLITE->value .'">SQLite</option>' : "";
|
|
||||||
|
|
||||||
$warn_msg = $warnings ? "<h3>Warnings</h3>".implode("\n<p>", $warnings) : "";
|
$warn_msg = $warnings ? "<h3>Warnings</h3>".implode("\n<p>", $warnings) : "";
|
||||||
$err_msg = $errors ? "<h3>Errors</h3>".implode("\n<p>", $errors) : "";
|
$err_msg = $errors ? "<h3>Errors</h3>".implode("\n<p>", $errors) : "";
|
||||||
|
@ -132,9 +132,9 @@ function ask_questions()
|
||||||
<tr>
|
<tr>
|
||||||
<th>Type:</th>
|
<th>Type:</th>
|
||||||
<td><select name="database_type" id="database_type" onchange="update_qs();">
|
<td><select name="database_type" id="database_type" onchange="update_qs();">
|
||||||
$db_m
|
$db_s
|
||||||
|
$db_m
|
||||||
$db_p
|
$db_p
|
||||||
$db_s
|
|
||||||
</select></td>
|
</select></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="dbconf mysql pgsql">
|
<tr class="dbconf mysql pgsql">
|
||||||
|
@ -161,13 +161,9 @@ function ask_questions()
|
||||||
return document.querySelectorAll(n);
|
return document.querySelectorAll(n);
|
||||||
}
|
}
|
||||||
function update_qs() {
|
function update_qs() {
|
||||||
Array.prototype.forEach.call(q('.dbconf'), function(el, i){
|
q('.dbconf').forEach(el => el.style.display = 'none');
|
||||||
el.style.display = 'none';
|
|
||||||
});
|
|
||||||
let seldb = q("#database_type")[0].value || "none";
|
let seldb = q("#database_type")[0].value || "none";
|
||||||
Array.prototype.forEach.call(q('.'+seldb), function(el, i){
|
q('.'+seldb).forEach(el => el.style.display = null);
|
||||||
el.style.display = null;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</form>
|
</form>
|
||||||
|
@ -178,8 +174,9 @@ function ask_questions()
|
||||||
The username provided must have access to create tables within the database.
|
The username provided must have access to create tables within the database.
|
||||||
</p>
|
</p>
|
||||||
<p class="dbconf sqlite">
|
<p class="dbconf sqlite">
|
||||||
For SQLite the database name will be a filename on disk, relative to
|
SQLite with default settings is fine for tens of users with thousands
|
||||||
where shimmie was installed.
|
of images. For thousands of users or millions of images, postgres is
|
||||||
|
recommended.
|
||||||
</p>
|
</p>
|
||||||
<p class="dbconf none">
|
<p class="dbconf none">
|
||||||
Drivers can generally be downloaded with your OS package manager;
|
Drivers can generally be downloaded with your OS package manager;
|
||||||
|
|
Reference in a new issue