czo*_*lbe 3 gradle flyway spring-boot
我正在运行gradle flywayMigrate并获取此输出,尽管它没有运行我的迁移脚本,但它没有显示任何错误:
Database: jdbc:mysql://localhost:3306 (MySQL 8.0)
Successfully validated 1 migration (execution time 00:00.006s)
Current version of schema `userdb`: null
Schema `userdb` is up to date. No migration necessary.
:flywayMigrate (Thread[Daemon worker Thread 3,5,main]) completed. Took 1.025 secs.
Run Code Online (Sandbox Code Playgroud)
我在gradle中的配置如下:
flyway{
url = 'jdbc:mysql://localhost:3306?&serverTimezone=UTC'
user = 'root'
password = 'password'
schemas = ['userdb']
locations = ['filesystem:src/main/resources/db/migration/']
}
Run Code Online (Sandbox Code Playgroud)
我的脚本位于:F:......\src\main\resources\db\migration\v1__Create_user_table.sql
create table USERS (
ID int not null,
NAME varchar(100) not null
);
Run Code Online (Sandbox Code Playgroud)
无法弄清楚为什么它不进行迁移。然而,它确实创建了飞行路线历史表。
| 归档时间: |
|
| 查看次数: |
2687 次 |
| 最近记录: |