Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Add support for MySQL 5/8 via MariaDB driver #22

Merged
merged 2 commits into from
Sep 2, 2022

Conversation

onobc
Copy link
Contributor

@onobc onobc commented Aug 31, 2022

This PR provides the following:

  • WHAT An EnvironmentPostProcessor that will replace the {vendor} token in any spring.flyway.locations entries.

    • WHY SpringBoot FlywayAutoConfiguration will replace the {vendor} token w/ mariadb when using the mariadb driver to talk to mysql db. Long term this should be fixed in SB. I will file an issue in SB once the dust settles here.
    • WHERE consumed in Dataflow and Skipper and there is an integration test in eachdataflow to verify this is doing what its supposed to.
  • WHAT a utility class to properly return a database driver given a datasource.

    • WHY the mechanism in Boot uses jdbc url from the database metadata which incorrectly reports MariaDB when using a MariaDB driver against a MySQL DB.
    • WHERE consumed in Dataflow and Skipper flyway callback customizer to ensure it picks proper baseline callback scripts

See spring-attic/spring-cloud-dataflow#4887

* Provide the FlywayVendorReplacingEnvironmentPostProcessor to replace {vendor} in spring.flyways.locations
Add back in the MySQL schema (used by Dataflow and Skipper)

* Provide utility to determine the proper driver given a datasource (used by Flyway customizers in Dataflow and Skipper)

See spring-attic/spring-cloud-dataflow#4887
@onobc onobc force-pushed the cbono-flyway-vendor-replacer branch from ee07f1a to 21ed72c Compare September 1, 2022 02:16
@onobc onobc changed the title Add Flyway vendor env post processor Add support for MySQL 5/8 via MariaDB driver Sep 1, 2022
@onobc onobc requested a review from cppwfs September 1, 2022 22:34
@onobc onobc merged commit a3332a6 into spring-attic:main Sep 2, 2022
@onobc onobc deleted the cbono-flyway-vendor-replacer branch September 2, 2022 17:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants