feat(routing): add logical group schema foundation

This commit is contained in:
phamnazage-jpg
2026-05-28 15:26:16 +08:00
parent e549549b4d
commit 7f75d8a670
3 changed files with 294 additions and 1 deletions

View File

@@ -102,6 +102,26 @@ func TestTableExists(t *testing.T) {
}
}
func TestOpenAppliesLogicalRoutingTables(t *testing.T) {
store := openTestDB(t)
db := store.SQLDB()
for _, table := range []string{
"logical_groups",
"logical_group_models",
"logical_group_routes",
"logical_group_route_models",
} {
found, err := tableExists(context.Background(), db, table)
if err != nil {
t.Fatalf("tableExists(%q) error = %v", table, err)
}
if !found {
t.Fatalf("tableExists(%q) = false, want true", table)
}
}
}
func TestDetectLegacy0001Schema(t *testing.T) {
store := openTestDB(t)
db := store.SQLDB()