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

Add DSL.using(Connection) and DSL.using(Connection, Settings) which auto-detect the SQLDialect from the jdbc url #2310

Closed
ben-manes opened this issue Mar 6, 2013 · 2 comments

Comments

@ben-manes
Copy link
Contributor

A nice enhancement in flyway 2.1 is that the driver is inferred from the jdbc url. This helps keep the configuration succinct. For example if the url started with jdbc:postgresql, the default the driver is org.postgresql.Driver. I think the generator.database.name could also be auto-detected as well.

@lukaseder
Copy link
Member

You're right. I had thought about this before, as well. Unfortunately, I must've forgotten creating an issue for this.

I guess this can lead to a default behaviour. In some cases, the JDBC URL is ambiguous. E.g.:

  • mysql-connector for MySQL / MariaDB
  • jtds for Sybase ASE / Sybase SQL Anywhere / SQL Server

In those cases, the default should be the most popular database...

@lukaseder
Copy link
Member

I'll check with Axel, if I may steal some code from him :-)
The relevant checkin is here:
flyway/flyway@8187329

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

2 participants