From 49f9d1076fabd239662ce92132b0c1d190e9606e Mon Sep 17 00:00:00 2001 From: ryan Date: Sat, 29 Aug 2026 11:58:56 +0800 Subject: [PATCH] fix(admin): move w_task_executions and w_schedules migrations to admin plugin - Include w_schedules and w_task_executions DDL in admin initial migrations for both SQLite and PostgreSQL dialects - Remove driver-specific migration registrations from driver_asynq_worker and driver_asynq_cron - Fix missing table error when running in Zero-Redis standalone mode without Asynq - Update white paper table ownership mapping and ensure test cleanup --- backend/cmd/app_test.go | 1 + backend/cmd/redis_plug_test.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/backend/cmd/app_test.go b/backend/cmd/app_test.go index 1ec92559..2376585f 100644 --- a/backend/cmd/app_test.go +++ b/backend/cmd/app_test.go @@ -121,6 +121,7 @@ func TestNewWaveletAppWithRedisEnabled(t *testing.T) { require.NotNil(t, app) defer func() { _ = app.Stop(context.Background()) + _ = app.Context().Dispose() }() require.NoError(t, app.Reconcile()) diff --git a/backend/cmd/redis_plug_test.go b/backend/cmd/redis_plug_test.go index a4fb8e0f..f717bdb9 100644 --- a/backend/cmd/redis_plug_test.go +++ b/backend/cmd/redis_plug_test.go @@ -208,6 +208,7 @@ func TestRedisPluggability_Simulation(t *testing.T) { stopCtx, stopCancel := context.WithTimeout(context.Background(), 5*time.Second) defer stopCancel() require.NoError(t, app.Stop(stopCtx)) + _ = app.Context().Dispose() }) // ══════════════════════════════════════════════════════════════════════════ @@ -235,6 +236,7 @@ func TestRedisPluggability_Simulation(t *testing.T) { require.NoError(t, cacheSvc1.Set(context.Background(), fmt.Sprintf("seq_key_%d", i), "seq_val_unplugged", time.Minute)) require.NoError(t, appUnplugged.Stop(context.Background())) + _ = appUnplugged.Context().Dispose() // 2. 插入 Redis 运行 appPlugged := newWaveletApp(core.ProfileAll, core.WithConfigValues(map[string]any{ @@ -253,6 +255,7 @@ func TestRedisPluggability_Simulation(t *testing.T) { require.NoError(t, cacheSvc2.Set(context.Background(), fmt.Sprintf("seq_key_%d", i), "seq_val_plugged", time.Minute)) require.NoError(t, appPlugged.Stop(context.Background())) + _ = appPlugged.Context().Dispose() } }) }