Spring:Flyway: Unterschied zwischen den Versionen

Aus Alexander's Wiki
(Die Seite wurde neu angelegt: „== Flyway in SpringBoot-Projekt == In pom.xml<syntaxhighlight lang="xml"> <dependency> <groupId>org.flywaydb</groupId> <artifactId>flyway-core</artifac…“)
(kein Unterschied)

Version vom 12. Mai 2022, 20:01 Uhr

Flyway in SpringBoot-Projekt

In pom.xml

<dependency>
    <groupId>org.flywaydb</groupId>
    <artifactId>flyway-core</artifactId>
    <version>${flyway.version}</version>
</dependency>
<dependency>
    <groupId>org.flywaydb</groupId>
    <artifactId>flyway-mysql</artifactId>
    <version>${flyway.version}</version>
</dependency>

In application.yaml

spring:
  flyway:
    enabled: true
    baselineOnMigrate: true
    check-location: true
    # schemas: public
    # unfortunately flyway cannot distinct between mysql and mariadb by {vendor}
    locations: classpath:db/migration/{vendor},classpath:db/migration/all #, filesystem:/opt/migration/{vendor}
    user: user
    password: password

Flyway in maven-Skript