Derby

Derby

Supported Versions

Support Level

Compatible ✓ (see notes below)
Certified
Guaranteed Flyway Teams

Support Level determines the degree of support available for this database (learn more).

Driver

URL format jdbc:derby:subsubprotocol:databaseName
Ships with Flyway Command-line Yes
Maven Central coordinates org.apache.derby:derbyclient
Supported versions 10.11 and later
Default Java class org.apache.derby.jdbc.EmbeddedDriver

SQL Script Syntax

Compatibility

  • DDL exported by Derby can be used unchanged in a Flyway migration
  • Any Derby SQL script executed by Flyway, can be executed by the Derby tools (after the placeholders have been replaced)
  • The Derby 10.15 driver requires Java 9+. Flyway users who are constrained to use Java 8 should not upgrade to Derby 10.15.

Example

/* Single line comment */
CREATE TABLE test_data (
  value VARCHAR(25) NOT NULL PRIMARY KEY
);

/*
Multi-line
comment
*/

-- Sql-style comment

-- Placeholder
INSERT INTO ${tableName} (name) VALUES ('Mr. T');

Limitations

  • None

Didn't find what you were looking for?