Get the most out of Flyway v7 - Sign up for our webinar on the Redgate Hub ▶ Watch now

TestContainers

Driver

URL format jdbc:tc: instead of jdbc: for your database
Ships with Flyway Command-line No
Maven Central coordinates Database specific JARs:
org.testcontainers:cockroachdb:jar:1.14.3
org.testcontainers:db2:jar:1.14.3
org.testcontainers:mariadb:jar:1.14.3
org.testcontainers:mssqlserver:jar:1.14.3
org.testcontainers:mysql:jar:1.14.3
org.testcontainers:oracle-xe:jar:1.14.3
org.testcontainers:postgresql:jar:1.14.3
Dependencies:
org.testcontainers:jdbc:jar:1.14.3
org.testcontainers:database-commons:jar:1.14.3
org.testcontainers:testcontainers:jar:1.14.3
Supported versions 1.14.3
Default Java class org.testcontainers.jdbc.ContainerDatabaseDriver

Compatibility

Example URL

jdbc:tc:postgresql:11-alpine://localhost:5432/databasename

Limitations

  • If Flyway doesn’t ship with a database driver for your chosen database, you will still need to provide one in order to use it with TestContainers. For example, if you want to connect to a DB2 database with TestContainers you will still need to provide a DB2 driver whose Maven Central coordinates are com.ibm.db2.jcc:11.5.0.0

PostgreSQL