我很困惑为什么我的基线脚本没有运行。
我按照这个说明操作 existing db baseline
当我运行以下clean,baseline,migrate时 基线脚本没有运行。 我期待V1__BaseLine.sql来自但不会从日志中运行。
the schema reports
1 1 1 BaseLine BASELINE BaseLine OEOWN 11/AUG/15 11:25:56.881000000 AM 0 1
2 2 1.3 create SQL V1_3__create.sql 1454099419 OEOWN 11/AUG/15 11:25:56.985000000 AM 3 0
scripts
----------
V1__BaseLine.sql
V1_3__create.sql
V1_4__create_other.sql
maven log
--- flyway-maven-plugin:3.2.1:clean (default-cli) @ SmartFormsService ---
[INFO] Flyway 3.2.1 by Boxfuse
[INFO] Database: jdbc:oracle:thin:@localhost:1521:xe (Oracle 11.2)
[INFO] Cleaned schema "OEOWN" (execution time 00:00.073s)
[INFO]
[INFO] --- flyway-maven-plugin:3.2.1:baseline (default-cli) @ SmartFormsService ---
[INFO] Database: jdbc:oracle:thin:@localhost:1521:xe (Oracle 11.2)
[INFO] Creating Metadata table: "OEOWN"."schema_version"
[INFO] Schema baselined with version: 1
[INFO]
[INFO] --- flyway-maven-plugin:3.2.1:migrate (default-cli) @ SmartFormsService ---
[INFO] Database: jdbc:oracle:thin:@localhost:1521:xe (Oracle 11.2)
[INFO] Validated 3 migrations (execution time 00:00.000s)
[INFO] Current version of schema "OEOWN": 1
[INFO] Migrating schema "OEOWN" to version 1.3 - create
[ERROR] Migration of schema "OEOWN" to version 1.3 failed! Please restore backups and roll back database and code!
任何帮助?
-lp
答案 0 :(得分:2)
Flyway基线是针对您不想运行V1基线脚本的DB运行的(不应该从头开始重新创建的数据库)
V1基线脚本仅适用于新的或已清理的数据库实例,其中未运行Flyway基线。
您所做的是同时运行Flyway基线并尝试运行V1基线脚本,这无法正常工作。
简化: