New! – Spin up instant copies of your dev databases in the cloud for free Learn more

Flyway Documentation

Poll

TiDB (Titanium DB)

Supported Versions

Support Level

Compatible
Certified
Guaranteed Flyway Teams

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

Drivers

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

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');

TestContainers