Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing bits in Flyway Dev UI migration #35116

Merged
merged 1 commit into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading