From 021f51457177abc071821199ec963628e8abc861 Mon Sep 17 00:00:00 2001 From: jdolle <1841898+jdolle@users.noreply.github.com> Date: Wed, 15 Jan 2025 08:39:48 -0800 Subject: [PATCH] Add defaults for new columns to ConditionalBreakingChangeMetadataModel --- packages/services/storage/src/schema-change-model.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/services/storage/src/schema-change-model.ts b/packages/services/storage/src/schema-change-model.ts index 3d5fca06c5..10106fe083 100644 --- a/packages/services/storage/src/schema-change-model.ts +++ b/packages/services/storage/src/schema-change-model.ts @@ -1007,8 +1007,8 @@ export const ConditionalBreakingChangeMetadataModel = z.object({ settings: z.object({ retentionInDays: z.number(), percentage: z.number(), - requestCount: z.number(), - breakingChangeFormula: z.enum(['PERCENTAGE', 'REQUEST_COUNT']), + requestCount: z.number().default(1), + breakingChangeFormula: z.enum(['PERCENTAGE', 'REQUEST_COUNT']).default('PERCENTAGE'), excludedClientNames: z.array(z.string()).nullable(), /** we keep both reference to id and name so in case target gets deleted we can still display the name */ targets: z.array(