documentation/Reference/Database Driver Reference/Redshift.md
{% include database-boilerplate.html %}
| Item | Details |
|---|---|
| URL format | <code>jdbc:redshift://<i>host</i>:<i>port</i>/<i>database</i></code> |
| Ships with Flyway Command-line | No |
| Download | Download the Amazon Redshift JDBC driver, version 2.1 |
| Supported versions | 2.1.0.32 and later |
| Default Java class | com.amazon.redshift.jdbc42.Driver |
See Adding to the classpath for details on how to add the driver to Flyway
Redshift support is a separate dependency for Flyway and will need to be added to your Java project to access these features.
Redshift is found within the flyway-database-redshift plugin module.
<dependency>
<groupId>com.redgate.flyway</groupId>
<artifactId>flyway-database-redshift</artifactId>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-database-redshift</artifactId>
</dependency>
buildscript {
dependencies {
implementation "com.redgate.flyway:flyway-database-redshift"
}
}
buildscript {
dependencies {
implementation "org.flywaydb:flyway-database-redshift"
}
}
Due to Redshift limitations ALTER TABLE and DROP TABLE for external tables can't run within a transaction, yet Flyway doesn't
autodetect this. You can work around this limitation and successfully execute such a statement by including a VACUUM
statement in the same SQL file as this will force Flyway to run the entire migration without a transaction.