Skip to content

Instantly share code, notes, and snippets.

@AlexRogalskiy
Last active January 28, 2021 19:04
Show Gist options
  • Save AlexRogalskiy/91a009e87cbadcc12c4ff4622baa12d6 to your computer and use it in GitHub Desktop.
Save AlexRogalskiy/91a009e87cbadcc12c4ff4622baa12d6 to your computer and use it in GitHub Desktop.
Maven flyway plugin sample
================================================================================
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<configuration>
<url>${env.JDBC_DATABASE_URL}</url>
</configuration>
</plugin>
================================================================================
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>6.5.5</version>
<executions>
<execution>
<goals>
<goal>migrate</goal>
</goals>
<phase>generate-resources</phase>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgres.version}</version>
</dependency>
</dependencies>
<configuration>
<url>${db.url}</url>
<user>${db.user}</user>
<password>${db.password}</password>
<createSchemas>false</createSchemas>
<locations>filesystem:src/main/resources/db/migration</locations>
</configuration>
</plugin>
================================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment