MyFlyWay
public class MyFlyWay {
public static void main(String[] args) {
Flyway flyway = new Flyway();
flyway.setDataSource("jdbc:mysql://localhost:3306/xxx","root","root");
flyway.migrate();
}
}
数据脚本默认放在db.migration
脚本命名规范:
The file name consists of:
prefix: Configurable, default: V for versioned migrations, R for repeatable migrations
version: (Versioned migrations only) Dots or underscores separate as many parts as you like
separator: Configurable, default: __ (two underscores)
description: Underscores or spaces separate the words
suffix: Configurable, default: .sql