-
Notifications
You must be signed in to change notification settings - Fork 2
Release Versions
Common setup for all the versions
buildscript {
repositories {
mavenCentral()
maven {
url uri('http://katta.github.com/repository')
}
}
dependencies {
classpath 'org.katta.gradle.api.plugins:flyway:[VERSION]'
classpath 'postgresql:postgresql:9.1-901.jdbc4'
}
}
apply plugin: 'flyway'
All flyway configuration has to be configured via flyway closure like this
flyway {
url='jdbc:postgresql://127.0.0.1/flyway'
driver='org.postgresql.Driver'
user='postgres'
password='s#cre#'
}
The only mandatory configs are the ones mentioned above. Apart from this the following configs are supported
schemas
table
locations
sqlMigrationPrefix
sqlMigrationSuffix
encoding
placeholderPrefix
placeholderSuffix
target
validationMode
validationErrorMode
disableInitCheck
For the details on what each of the above config means refer flyway wiki.
Flyway configuration via properties no longer supported with this version. All flyway configuration has to be configured via flyway closure like this
flyway {
url='jdbc:postgresql://127.0.0.1/flyway'
driver='org.postgresql.Driver'
user='postgres'
password='s#cre#'
}
Only the above mentioned configuration are supported this version
Group id of the flyway plugin changed to org.katta.gradle.api.plugins. Specify this groupId in the buildScript dependencies.
Flyway configuration has to be specified in the form of properties by specifying configFile
flyway {
configFile = file("flyway-config.properties")
}
The flyway-config.properties
should contain all the flyway configuration values like given below and all the mentioned properties here are mandatory.
For the complete refence of flyway configuration(options) refer flyway wiki under each of the commands
flyway.driver=org.postgresql.Driver
flyway.url=jdbc:postgresql://127.0.0.1/flyway
flyway.user=postgres
flyway.password=password
Group id of the flyway plugin is org.gradle.api.plugins. Specify this groupId in the buildScript dependencies.
Flyway configuration has to be specified in the form of properties by specifying configFile
flyway {
configFile = file("flyway-config.properties")
}
**The flyway-config.properties
should contain all the flyway configuration values like given below and all the mentioned properties here are mandatory.
For the complete refence of flyway configuration(options) refer flyway wiki under each of the commands
flyway.driver=org.postgresql.Driver
flyway.url=jdbc:postgresql://127.0.0.1/flyway
flyway.user=postgres
flyway.password=password