Commit 4c080ebe authored by Matt Tucker's avatar Matt Tucker Committed by matt

Fixed postgres auto-update, better error logging.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@4185 b35dd754-fafc-0310-a699-88a17e54d16e
parent d291147c
...@@ -664,7 +664,7 @@ public class DbConnectionManager { ...@@ -664,7 +664,7 @@ public class DbConnectionManager {
} }
// Postgres properties // Postgres properties
else if (dbName.indexOf("postgres") != -1) { else if (dbName.indexOf("postgres") != -1) {
databaseType = DatabaseType.postgres; databaseType = DatabaseType.postgresql;
// Postgres blows, so disable scrolling result sets. // Postgres blows, so disable scrolling result sets.
scrollResultsSupported = false; scrollResultsSupported = false;
fetchSizeSupported = false; fetchSizeSupported = false;
...@@ -781,7 +781,7 @@ public class DbConnectionManager { ...@@ -781,7 +781,7 @@ public class DbConnectionManager {
oracle, oracle,
postgres, postgresql,
mysql, mysql,
......
...@@ -19,6 +19,7 @@ import org.jivesoftware.admin.AdminConsole; ...@@ -19,6 +19,7 @@ import org.jivesoftware.admin.AdminConsole;
import org.jivesoftware.database.DbConnectionManager; import org.jivesoftware.database.DbConnectionManager;
import org.jivesoftware.util.Log; import org.jivesoftware.util.Log;
import org.jivesoftware.util.Version; import org.jivesoftware.util.Version;
import org.jivesoftware.util.LocaleUtils;
import org.jivesoftware.wildfire.XMPPServer; import org.jivesoftware.wildfire.XMPPServer;
import java.io.*; import java.io.*;
...@@ -368,7 +369,11 @@ public class PluginManager { ...@@ -368,7 +369,11 @@ public class PluginManager {
} }
// Check the plugin's database schema (if it requires one). // Check the plugin's database schema (if it requires one).
DbConnectionManager.getSchemaManager().checkPluginSchema(plugin); if (!DbConnectionManager.getSchemaManager().checkPluginSchema(plugin)) {
// The schema was not there and auto-upgrade failed.
Log.error(LocaleUtils.getLocalizedString("upgrade.database.failure"));
System.out.println(LocaleUtils.getLocalizedString("upgrade.database.failure"));
}
// Load any JSP's defined by the plugin. // Load any JSP's defined by the plugin.
File webXML = new File(pluginDir, "web" + File.separator + "WEB-INF" + File webXML = new File(pluginDir, "web" + File.separator + "WEB-INF" +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment