Only report when we actually do something.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1584 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -300,8 +300,8 @@ public class JDBCUtil
|
||||
throws SQLException
|
||||
{
|
||||
if (JDBCUtil.tableContainsColumn(conn, table, cname)) {
|
||||
Log.info("Database table '" + table + "' already has column '" +
|
||||
cname + "'.");
|
||||
// Log.info("Database table '" + table + "' already has column '" +
|
||||
// cname + "'.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -334,13 +334,13 @@ public class JDBCUtil
|
||||
PreparedStatement stmt = null;
|
||||
try {
|
||||
stmt = conn.prepareStatement(update);
|
||||
stmt.executeUpdate();
|
||||
if (stmt.executeUpdate() == 1) {
|
||||
Log.info("Database index '" + iname + "' removed from " +
|
||||
"table '" + table + "'.");
|
||||
}
|
||||
} finally {
|
||||
close(stmt);
|
||||
}
|
||||
|
||||
Log.info("Database index '" + iname + "' removed from table '" + table +
|
||||
"'.");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -354,12 +354,12 @@ public class JDBCUtil
|
||||
PreparedStatement stmt = null;
|
||||
try {
|
||||
stmt = conn.prepareStatement(update);
|
||||
stmt.executeUpdate();
|
||||
if (stmt.executeUpdate() == 1) {
|
||||
Log.info("Database primary key removed from '" + table + "'.");
|
||||
}
|
||||
} finally {
|
||||
close(stmt);
|
||||
}
|
||||
|
||||
Log.info("Database primary key removed from table '" + table + "'.");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -372,9 +372,9 @@ public class JDBCUtil
|
||||
throws SQLException
|
||||
{
|
||||
if (JDBCUtil.tableContainsIndex(conn, table, cname, iname)) {
|
||||
Log.info("Database table '" + table + "' already has an index on " +
|
||||
"column '" + cname + "'" +
|
||||
(iname != null ? " named '" + iname + "'." : "."));
|
||||
// Log.info("Database table '" + table + "' already has an index " +
|
||||
// "on column '" + cname + "'" +
|
||||
// (iname != null ? " named '" + iname + "'." : "."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user