Skip to content

Commit 8839dde

Browse files
committed
指令不区分大小写
1 parent 2e231d3 commit 8839dde

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

src/main/java/io/sqlman/version/JdbcVersionManager.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ public JdbcVersionManager(
3939
public void upgrade() throws SQLException {
4040
SqlLogger logger = logger(this.getClass());
4141

42-
logger.info("Locking");
42+
logger.info("Schema locking");
4343
lockup();
44-
logger.info("Locked");
44+
logger.info("Schema locked");
4545
try {
4646
logger.info("Creating schema version table");
4747
create();
@@ -82,9 +82,9 @@ public void upgrade() throws SQLException {
8282
} catch (Exception ex) {
8383
throw new SQLException(ex.getMessage(), ex);
8484
} finally {
85-
logger.info("Unlocking");
85+
logger.info("Schema unlocking");
8686
unlock();
87-
logger.info("Unlocked");
87+
logger.info("Schema unlocked");
8888
}
8989
}
9090

@@ -150,11 +150,7 @@ public Integer execute(Connection connection) throws SQLException {
150150
SqlSentence sentence = script.sentence(ordinal);
151151
String sql = sentence.value();
152152

153-
if (logger.isDebugEnabled()) {
154-
logger.debug("Executing sentence {}/{} of script version {} in {} transaction isolation level \n{}", ordinal + 1, script.sqls(), script.version(), isolation, sql);
155-
} else {
156-
logger.info("Executing sentence {}/{} of script version {} in {} transaction isolation level", ordinal + 1, script.sqls(), script.version(), isolation);
157-
}
153+
logger.info("Executing sentence {}/{} of script version {} in {} transaction isolation level : {}", ordinal + 1, script.sqls(), script.version(), isolation, sql.replaceAll("\\s+", " "));
158154

159155
PreparedStatement statement = connection.prepareStatement(sql);
160156
int rows = statement.executeUpdate();

0 commit comments

Comments
 (0)