<commit_before>////
This guide is maintained in the main Quarkus repository
and pull requests should be submitted there:
https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
////
= Using Flyway

include::./attributes.adoc[]
:migrations-path: src/main/resources/db/migration
:config-file: application.properties

https://flywaydb.org/[Flyway] is a popular database migration tool that is commonly used in JVM environments.

Quarkus provides first class support for using Flyway as will be explained in this guide.

== Setting up support for Flyway

To start using Flyway with your project, you just need to:

* add your migrations to the `{migrations-path}` folder as you usually do with Flyway
* activate the `migrate-at-start` option to migrate the schema automatically or inject the `Flyway` object and run
your migration as you normally do

In your `pom.xml`, add the following dependencies:

* the Flyway extension
* your JDBC driver extension (`quarkus-jdbc-postgresql`, `quarkus-jdbc-h2`, `quarkus-jdbc-mariadb`, ...)
* the SQL Server support is now in a separate dependency, SQL Server users need to add the `flyway-sqlserver` dependency from now on.
[source,xml]
----
<dependencies>
    <!-- Flyway specific dependencies -->
    <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-flyway</artifactId>
    </dependency>
    
    <!-- Flyway SQL Server specific dependencies -->
    <dependency>
        <groupId>org.flywaydb</groupId>
        <artifactId>flyway-sqlserver</artifactId>
    </dependency>

    <!-- JDBC driver dependencies -->
    <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-jdbc-postgresql</artifactId>
    </dependency>
</dependencies>
----

Flyway support relies on the Quarkus datasource config.<commit_msg>Document the need for flyway-mysql<commit_after>////
This guide is maintained in the main Quarkus repository
and pull requests should be submitted there:
https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
////
= Using Flyway

include::./attributes.adoc[]
:migrations-path: src/main/resources/db/migration
:config-file: application.properties

https://flywaydb.org/[Flyway] is a popular database migration tool that is commonly used in JVM environments.

Quarkus provides first class support for using Flyway as will be explained in this guide.

== Setting up support for Flyway

To start using Flyway with your project, you just need to:

* add your migrations to the `{migrations-path}` folder as you usually do with Flyway
* activate the `migrate-at-start` option to migrate the schema automatically or inject the `Flyway` object and run
your migration as you normally do

In your `pom.xml`, add the following dependencies:

* the Flyway extension
* your JDBC driver extension (`quarkus-jdbc-postgresql`, `quarkus-jdbc-h2`, `quarkus-jdbc-mariadb`, ...)
* the MariaDB/MySQL support is now in a separate dependency, MariaDB/MySQL users need to add the `flyway-mysql` dependency from now on.
* the SQL Server support is now in a separate dependency, SQL Server users need to add the `flyway-sqlserver` dependency from now on.

[source,xml]
----
<dependencies>
    <!-- Flyway specific dependencies -->
    <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-flyway</artifactId>
    </dependency>
    
    <!-- Flyway SQL Server specific dependencies -->
    <dependency>
        <groupId>org.flywaydb</groupId>
        <artifactId>flyway-sqlserver</artifactId>
    </dependency>

    <!-- Flyway MariaDB/MySQL specific dependencies -->
    <dependency>
        <groupId>org.flywaydb</groupId>
        <artifactId>flyway-mariadb</artifactId>
    </dependency>

    <!-- JDBC driver dependencies -->
    <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-jdbc-postgresql</artifactId>
    </dependency>
</dependencies>
----

Flyway support relies on the Quarkus datasource config.
{'fraction_non_alphanumeric': 0.10550227158001009, 'fraction_numerical': 0.0005047955577990914, 'mean_word_length': 3.701067615658363, 'pattern_counts': {'":': 0, '<': 56, '<?xml version=': 0, '>': 56, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1989120', 'n_tokens_mistral': 1195, 'n_tokens_neox': 1093, 'n_words': 387}