Skip to content

Commit

Permalink
fix-生成的sql为null的错误
Browse files Browse the repository at this point in the history
  • Loading branch information
18940818955 committed Dec 10, 2019
1 parent f7d680a commit d80bbff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public List<String> getSqlList() {
if (ObjectUtils.isEmpty(this.delete)
&& ObjectUtils.isEmpty(this.create)
&& ObjectUtils.isEmpty(this.update)) {
return null;
return new ArrayList<>();
}
log.debug("开始生成sql...");
resolveDeleteSql();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ public void diff() throws SQLException {
Migrate migrate = new Migrate().from(from).to(to);
DiffResult diffResult = migrate.diff();
List<String> sql = diffResult.getSqlList();
System.out.println(sql);
for (String s : sql) {
System.out.println(s);
}
}

@Test
Expand Down

0 comments on commit d80bbff

Please sign in to comment.