Flyway

TiDB (Titanium DB)

TiDB (Titanium DB)

  • Verified Versions: 5.0
  • Maintainer: Community

Supported Versions and Support Levels

Driver

Item Details
URL format jdbc:mysql://host:port/database
SSL support Not tested
Ships with Flyway Command-line Yes
Maven Central coordinates mysql:mysql-connector-java
Supported versions 5.0 and later
Default Java class com.mysql.jdbc.Driver

Java Usage

YugabyteDB support is a separate dependency for Flyway and will need to be added to your Java project to access these features.

Maven

Open Source


<dependency>
    <groupId>org.flywaydb</groupId>
    <artifactId>flyway-database-tidb</artifactId>
</dependency>

Gradle

Open Source

dependencies {
    compile "org.flywaydb:flyway-database-tidb"
}

SQL Script Syntax

Example

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

/*
Multi-line
comment
*/

-- MySQL procedure
DELIMITER //
CREATE PROCEDURE AddData()
 BEGIN
   # MySQL-style single line comment
   INSERT INTO test_data (value) VALUES ('Hello');
 END //
DELIMITER;

CALL AddData();

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

Didn't find what you were looking for?