Skip to content

Commit c49beff

Browse files
committed
fix logic error in the create-when-not-exists feature for h2 database
1 parent 44482f3 commit c49beff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/act/db/ebean/EbeanService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,14 @@ private ServerConfig serverConfig(String id, Map<String, Object> conf) {
159159
if (null != ddlRun) {
160160
sc.setDdlRun(Boolean.parseBoolean(ddlRun));
161161
} else if (Act.isDev()) {
162-
sc.setDdlRun(noddl);
162+
sc.setDdlRun(!noddl);
163163
}
164164

165165
String ddlCreateOnly = (String) conf.get("ddl.createOnly");
166166
if (null != ddlCreateOnly) {
167167
sc.setDdlCreateOnly(Boolean.parseBoolean(ddlCreateOnly));
168-
} else {
169-
sc.setDdlCreateOnly(true);
168+
} else if (Act.isDev()) {
169+
sc.setDdlCreateOnly(!noddl);
170170
}
171171

172172
for (Class<?> c : modelTypes) {

0 commit comments

Comments
 (0)