From 27a96a40db9d165f57ef64f09a2a7ef572ab58c2 Mon Sep 17 00:00:00 2001 From: alecpl Date: Tue, 10 Aug 2010 06:32:50 +0000 Subject: - Fix path to SQL files when using pgsql/mysqli/sqlsrv drivers (#1486902) --- bin/update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/update.sh') 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; -- cgit v1.2.3