CockroachDB
Supported Versions
Driver
|
PostgreSQL |
Supported versions |
9.3-1104-jdbc4 and later |
URL format |
jdbc:postgresql://host:port/database |
Ships with Flyway Command-line |
Yes |
Maven Central coordinates |
org.postgresql:postgresql:42.1.4 |
Default Java class |
org.postgresql.Driver |
SQL Script Syntax
Compatibility
- DDL exported by pg_dump can be used unchanged in a Flyway migration.
- Any CockroachDB sql script executed by Flyway, can be executed by the CockroachDB command-line tool and other
PostgreSQL-compatible tools (after the placeholders have been replaced).
Example
/* 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');
Limitations
- No support for psql meta-commands with no JDBC equivalent like
\set
SAP HANA