fix: handle nullable recalled_by in mysql messages

This commit is contained in:
richjohnrambo
2026-08-23 23:08:56 +08:00
parent 641697e755
commit a578acebf7
2 changed files with 37 additions and 18 deletions
@@ -12,11 +12,17 @@ func TestEnsureIMHTTPInfrastructureTablesUsesSelectedTenantDatabase(t *testing.T
if err := ensureIMHTTPInfrastructureTables(exec); err != nil {
t.Fatal(err)
}
if len(exec.statements) != 2 {
t.Fatalf("created %d infrastructure tables, want 2", len(exec.statements))
if len(exec.statements) != 5 {
t.Fatalf("created %d infrastructure tables, want 5", len(exec.statements))
}
joined := strings.ToLower(strings.Join(exec.statements, "\n"))
for _, table := range []string{"im_http_idempotency", "im_business_events_outbox"} {
for _, table := range []string{
"im_http_idempotency",
"im_business_events_outbox",
"im_realname_appeals",
"im_conversation_settings",
"im_topic_drafts",
} {
if !strings.Contains(joined, table) {
t.Fatalf("missing table %s", table)
}