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
|
throws SQLException
|
||||||
{
|
{
|
||||||
if (JDBCUtil.tableContainsColumn(conn, table, cname)) {
|
if (JDBCUtil.tableContainsColumn(conn, table, cname)) {
|
||||||
Log.info("Database table '" + table + "' already has column '" +
|
// Log.info("Database table '" + table + "' already has column '" +
|
||||||
cname + "'.");
|
// cname + "'.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -334,13 +334,13 @@ public class JDBCUtil
|
|||||||
PreparedStatement stmt = null;
|
PreparedStatement stmt = null;
|
||||||
try {
|
try {
|
||||||
stmt = conn.prepareStatement(update);
|
stmt = conn.prepareStatement(update);
|
||||||
stmt.executeUpdate();
|
if (stmt.executeUpdate() == 1) {
|
||||||
|
Log.info("Database index '" + iname + "' removed from " +
|
||||||
|
"table '" + table + "'.");
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
close(stmt);
|
close(stmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.info("Database index '" + iname + "' removed from table '" + table +
|
|
||||||
"'.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -354,12 +354,12 @@ public class JDBCUtil
|
|||||||
PreparedStatement stmt = null;
|
PreparedStatement stmt = null;
|
||||||
try {
|
try {
|
||||||
stmt = conn.prepareStatement(update);
|
stmt = conn.prepareStatement(update);
|
||||||
stmt.executeUpdate();
|
if (stmt.executeUpdate() == 1) {
|
||||||
|
Log.info("Database primary key removed from '" + table + "'.");
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
close(stmt);
|
close(stmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.info("Database primary key removed from table '" + table + "'.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -372,9 +372,9 @@ public class JDBCUtil
|
|||||||
throws SQLException
|
throws SQLException
|
||||||
{
|
{
|
||||||
if (JDBCUtil.tableContainsIndex(conn, table, cname, iname)) {
|
if (JDBCUtil.tableContainsIndex(conn, table, cname, iname)) {
|
||||||
Log.info("Database table '" + table + "' already has an index on " +
|
// Log.info("Database table '" + table + "' already has an index " +
|
||||||
"column '" + cname + "'" +
|
// "on column '" + cname + "'" +
|
||||||
(iname != null ? " named '" + iname + "'." : "."));
|
// (iname != null ? " named '" + iname + "'." : "."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user