documentation/Reference/Database Driver Reference/CockroachDB.md
{% include database-boilerplate.html %}
| Item | Details |
|---|---|
| URL format | <code>jdbc:postgresql://<i>host</i>:<i>port</i>/<i>database</i></code> |
| SSL support | Yes |
| Ships with Flyway Command-line | Yes |
| Maven Central coordinates | org.postgresql:postgresql |
| Supported versions | 9.3-1104-jdbc4 and later |
| Default Java class | org.postgresql.Driver |
CockroachDB support is a separate dependency for Flyway and will need to be added to your Java project to access these features.
CockroachDB is found within the flyway-database-postgresql plugin module.
<dependency>
<groupId>com.redgate.flyway</groupId>
<artifactId>flyway-database-postgresql</artifactId>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-database-postgresql</artifactId>
</dependency>
buildscript {
dependencies {
implementation "com.redgate.flyway:flyway-database-postgresql"
}
}
buildscript {
dependencies {
implementation "org.flywaydb:flyway-database-postgresql"
}
}
/* Single line comment */
CREATE TABLE test_data (
value VARCHAR(25) NOT NULL PRIMARY KEY
);
/*
Multi-line
comment
*/
-- Placeholder
INSERT INTO ${tableName} (name) VALUES ('Mr. T');
\set