From 9b9a24d7dcc37dbfc97cd845ab35409ec8b3c347 Mon Sep 17 00:00:00 2001 From: "Yangkai.Shen" <237497819@qq.com> Date: Tue, 10 Mar 2020 13:27:06 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20spring-boot-demo-flyway=20?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spring-boot-demo-flyway/README.md | 4 ++++ spring-boot-demo-flyway/src/main/resources/application.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/spring-boot-demo-flyway/README.md b/spring-boot-demo-flyway/README.md index 2186aaec0..016ad45a7 100644 --- a/spring-boot-demo-flyway/README.md +++ b/spring-boot-demo-flyway/README.md @@ -57,6 +57,10 @@ spring: clean-disabled: true # 校验路径下是否存在 SQL 文件 check-location: false + # 最开始已经存在表结构,且不存在 flyway_schema_history 表时,需要设置为 true + baseline-on-migrate: true + # 基础版本 0 + baseline-version: 0 datasource: url: jdbc:mysql://127.0.0.1:3306/flyway-test?useSSL=false username: root diff --git a/spring-boot-demo-flyway/src/main/resources/application.yml b/spring-boot-demo-flyway/src/main/resources/application.yml index 7c32fe96b..e95f0fcbe 100644 --- a/spring-boot-demo-flyway/src/main/resources/application.yml +++ b/spring-boot-demo-flyway/src/main/resources/application.yml @@ -7,6 +7,10 @@ spring: clean-disabled: true # 校验路径下是否存在 SQL 文件 check-location: false + # 最开始已经存在表结构,且不存在 flyway_schema_history 表时,需要设置为 true + baseline-on-migrate: true + # 基础版本 0 + baseline-version: 0 datasource: url: jdbc:mysql://127.0.0.1:3306/flyway-test?useSSL=false username: root