This commit is contained in:
2026-09-07 15:07:34 +08:00
parent 693e10188c
commit 1b47158770
37 changed files with 688 additions and 144 deletions
@@ -17,7 +17,11 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
class SchemaChineseCommentContractTest {
private static final Set<String> MODULE_BASELINE_ONLY_TABLES = Set.of(
"ll_us_truck_order_operation", "ll_local_looseboard_operation");
"ll_us_truck_order_operation", "ll_local_looseboard_operation",
"ll_receiving_warehouse_operation");
private static final Set<String> MODULE_BASELINE_ONLY_COLUMNS = Set.of(
"ll_order.overseas_warehouse_code", "ll_order.receiving_warehouse_version",
"ll_receiving_container_session.overseas_warehouse_code");
private static final Pattern CHINESE = Pattern.compile("[\\u4e00-\\u9fff]");
private static final Pattern TABLE = Pattern.compile(
@@ -138,6 +142,9 @@ class SchemaChineseCommentContractTest {
continue;
}
for (String column : table.columns()) {
if (MODULE_BASELINE_ONLY_COLUMNS.contains(table.name() + "." + column)) {
continue;
}
boolean repaired = migration.contains("table_name='" + table.name()
+ "' AND column_name='" + column + "'");
boolean addedWithComment = hasCommentedAdd(migration, column)