summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-08-10 06:32:50 +0000
committeralecpl <alec@alec.pl>2010-08-10 06:32:50 +0000
commit27a96a40db9d165f57ef64f09a2a7ef572ab58c2 (patch)
tree5a349afdf778ea057a75e5a8a080b01f00995323 /bin
parentecc28ce02fcfd3eaf0356c0e70dd6b929bc81771 (diff)
- Fix path to SQL files when using pgsql/mysqli/sqlsrv drivers (#1486902)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/update.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/update.sh b/bin/update.sh
index 7a4d1cf17..2d59b26c1 100755
--- a/bin/update.sh
+++ b/bin/update.sh
@@ -114,7 +114,8 @@ if ($RCI->configured) {
$success = false;
}
else if ($RCI->db_schema_check($DB, false)) {
- $updatefile = INSTALL_PATH . 'SQL/' . $DB->db_provider . '.update.sql';
+ $db_map = array('pgsql' => 'postgres', 'mysqli' => 'mysql', 'sqlsrv' => 'mssql');
+ $updatefile = INSTALL_PATH . 'SQL/' . (isset($db_map[$DB->db_provider]) ? $db_map[$DB->db_provider] : $DB->db_provider) . '.update.sql';
echo "WARNING: Database schema needs to be updated!\n";
echo "Open $updatefile and execute all queries that are superscribed with the currently installed version number\n";
$success = false;