Skip to content

Improve DB-Migrator messaging when creating a new schema #1387

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

Closed
ipolevoy opened this issue Mar 6, 2025 · 1 comment
Closed

Improve DB-Migrator messaging when creating a new schema #1387

ipolevoy opened this issue Mar 6, 2025 · 1 comment

Comments

@ipolevoy
Copy link
Member

ipolevoy commented Mar 6, 2025

when creating a new schema, and it already exists, this is not an exception, since the desired outcome is already there.

Currently, this is emitted:

[ERROR] Failed to execute goal org.javalite:db-migrator-maven-plugin:3.4-SNAPSHOT:create (default-cli) on project embedded-tomcat-integration-test: Failed to create database: jdbc:mariadb://localhost:3309/javalite_tomcat: org.javalite.activejdbc.DBException: java.sql.SQLException: (conn=8) Can't create database 'javalite_tomcat'; database exists, query: create database javalite_tomcat -> [Help 1]

A better solution is to display a warning:

[WARNING] The schema jdbc:mariadb://localhost:3309/javalite_tomcat already exists. 
@ipolevoy
Copy link
Member Author

Note: this will require catching exceptions from all supported databases, maybe not worth the effort

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy