Skip to content

Commit

Permalink
Merge pull request #35116 from gastaldi/flyway_dev_improvements
Browse files Browse the repository at this point in the history
Fix missing bits in Flyway Dev UI migration
  • Loading branch information
gastaldi authored Jul 31, 2023
2 parents d00556f + f308816 commit cc2ebbc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,11 @@ export class QwcFlywayDatasources extends QwcHotReloadElement {
}

_clean(ds) {
this.jsonRpc.clean({ds: ds.name}).then(jsonRpcResponse => {
this._showResultNotification(jsonRpcResponse.result);
});
if (confirm('This will drop all objects (tables, views, procedures, triggers, ...) in the configured schema. Do you want to continue?')) {
this.jsonRpc.clean({ds: ds.name}).then(jsonRpcResponse => {
this._showResultNotification(jsonRpcResponse.result);
});
}
}

_migrate(ds) {
Expand Down Expand Up @@ -170,4 +172,4 @@ export class QwcFlywayDatasources extends QwcHotReloadElement {
}

}
customElements.define('qwc-flyway-datasources', QwcFlywayDatasources);
customElements.define('qwc-flyway-datasources', QwcFlywayDatasources);
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public FlywayActionResponse create(String ds) {
return new FlywayActionResponse("success",
"Initial migration created, Flyway will now manage this datasource");
} catch (Throwable t) {
new FlywayActionResponse("error", t.getMessage());
return new FlywayActionResponse("error", t.getMessage());
}
}
return errorNoScript(ds);
Expand Down Expand Up @@ -184,7 +184,7 @@ private Flyway getFlyway(String ds) {
return null;
}

static class FlywayDatasource {
public static class FlywayDatasource {
public String name;
public boolean hasMigrations;
public boolean createPossible;
Expand All @@ -199,7 +199,7 @@ public FlywayDatasource(String name, boolean hasMigrations, boolean createPossib
}
}

static class FlywayActionResponse {
public static class FlywayActionResponse {
public String type;
public String message;
public int number;
Expand Down

0 comments on commit cc2ebbc

Please sign in to comment.