From dff0658b32bc7de545dfecc924c1d09300d509bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E8=87=AA=E8=BE=BE?= <980324341@qq.com> Date: Sat, 24 Oct 2026 16:56:12 +0800 Subject: [PATCH] =?UTF-8?q?chore(migration):=20V168/169=20=E7=BA=AF?= =?UTF-8?q?=E8=B7=B3=E5=8F=B7=E5=B0=81=E8=B4=A6=E5=85=A5=20RETIRED=5FHOLES?= =?UTF-8?q?=E2=80=94=E2=80=94=E5=BD=92=E5=86=99=20cost-guard=20V170=20?= =?UTF-8?q?=E9=82=A3=E4=B8=80=E8=B7=AF=EF=BC=889c4905c9=20=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E5=8F=96=E5=8F=B7=20170=EF=BC=8C=E4=B8=A4=E5=8F=B7?= =?UTF-8?q?=E5=85=A8=E5=8E=86=E5=8F=B2=E9=9B=B6=E8=90=BD=E7=9B=98=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/nanri/aiimage/config/MigrationInventoryTest.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/backend-java/src/test/java/com/nanri/aiimage/config/MigrationInventoryTest.java b/backend-java/src/test/java/com/nanri/aiimage/config/MigrationInventoryTest.java index 80f67a26d..ac76b5a65 100644 --- a/backend-java/src/test/java/com/nanri/aiimage/config/MigrationInventoryTest.java +++ b/backend-java/src/test/java/com/nanri/aiimage/config/MigrationInventoryTest.java @@ -67,7 +67,7 @@ class MigrationInventoryTest { } /** - * 不许再被占用的整数版本洞。两条来历不同,得分开记: + * 不许再被占用的整数版本洞。三条来历不同,得分开记: * *
132/133:已在生产 {@code flyway_schema_history} 中占位、但本地文件被改名让位的版本号。 * 生产 131 之后直接装了 134/135(2026-09-25 20:46:16),132/133 从未落库;而 Flyway 未开 @@ -82,9 +82,14 @@ class MigrationInventoryTest { * 而同号两个文件会让 Flyway 启动期报 "Found more than one migration with version 148", * 后果是两台 java 同时起不来。宁可让本用例红,也不把撞号留到运行期发现。
* + *168/169:从未有文件占用过的纯跳号,归 cost-guard 那一路({@code V170__user_task_guard.sql}, + * commit 9c4905c9)——写 170 时直接越过 168/169,全 git 历史核对零命中,两号无人落盘。 + * 目录最大值升到 170 之后若回填新内容,已应用 170 的环境在 Flyway out-of-order 关闭下会把它当 + * ignored migration 静默跳过,各环境 Schema 悄悄漂移。与 148 不同这不是并发护栏,是既成跳号的封账。
+ * *共同后果:新迁移只能取当前最大值之上的号(详见 docs/migration-inventory.md)。
*/ - private static final Set