Commit 614352fe authored by Matt Tucker's avatar Matt Tucker Committed by matt

Fix db upgrade warnings.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@4189 b35dd754-fafc-0310-a699-88a17e54d16e
parent ba49dc5a
...@@ -87,7 +87,8 @@ public class SchemaManager { ...@@ -87,7 +87,8 @@ public class SchemaManager {
* *
* @param plugin the plugin. * @param plugin the plugin.
* @return true if database schema checked out fine, or was automatically installed * @return true if database schema checked out fine, or was automatically installed
* or updated successfully. * or updated successfully, or if it isn't needed. False will only be returned
* if there is an error.
*/ */
public boolean checkPluginSchema(final Plugin plugin) { public boolean checkPluginSchema(final Plugin plugin) {
final PluginManager pluginManager = XMPPServer.getInstance().getPluginManager(); final PluginManager pluginManager = XMPPServer.getInstance().getPluginManager();
...@@ -96,7 +97,7 @@ public class SchemaManager { ...@@ -96,7 +97,7 @@ public class SchemaManager {
// If the schema key or database version aren't defined, then the plugin doesn't // If the schema key or database version aren't defined, then the plugin doesn't
// need database tables. // need database tables.
if (schemaKey == null || schemaVersion == -1) { if (schemaKey == null || schemaVersion == -1) {
return false; return true;
} }
Connection con = null; Connection con = null;
try { try {
...@@ -177,7 +178,7 @@ public class SchemaManager { ...@@ -177,7 +178,7 @@ public class SchemaManager {
} }
// If already up to date, return. // If already up to date, return.
if (currentVersion == requiredVersion) { if (currentVersion == requiredVersion) {
return false; return true;
} }
// If the database schema isn't installed at all, we need to install it. // If the database schema isn't installed at all, we need to install it.
else if (currentVersion == -1) { else if (currentVersion == -1) {
......
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