fix(lastleg): align overseas business incremental schema

This commit is contained in:
2026-08-25 13:07:01 +08:00
parent 995c1833f8
commit 79eb3efe61
4 changed files with 100 additions and 4 deletions
@@ -2,6 +2,8 @@ package com.baiyue.lastleg.looseboard;
import org.junit.jupiter.api.Test;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.charset.StandardCharsets;
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -24,4 +26,13 @@ class LocalLooseboardSchemaContractTest {
assertTrue(sql.contains("customer_id VARCHAR(128) NOT NULL COMMENT '客户数据隔离键'"));
assertTrue(sql.contains("idx_ll_loading_history_customer_order(customer_id,order_id,created_at)"));
}
@Test
void unifiedIncrementalContainsHistoryIdempotencyAndOperationLedger() throws Exception {
String sql = Files.readString(Path.of("..", "deploy", "sql", "海外区域统一增量-MySQL8.sql"),
StandardCharsets.UTF_8);
assertTrue(sql.contains("CREATE TABLE IF NOT EXISTS ll_local_looseboard_operation"));
assertTrue(sql.contains("uk_ll_local_looseboard_operation_key(customer_id,order_id,idempotency_key)"));
assertTrue(sql.contains("table_name='ll_local_looseboard_history' AND column_name='idempotency_key'"));
}
}