diff --git a/backend/src/ee/services/pam-resource/mysql/mysql-resource-schemas.ts b/backend/src/ee/services/pam-resource/mysql/mysql-resource-schemas.ts index 91ffa61ea..c87aa019a 100644 --- a/backend/src/ee/services/pam-resource/mysql/mysql-resource-schemas.ts +++ b/backend/src/ee/services/pam-resource/mysql/mysql-resource-schemas.ts @@ -58,19 +58,14 @@ export const MySQLAccountSchema = BasePamAccountSchema.extend({ credentials: MySQLAccountCredentialsSchema }); -export const CreateMySQLAccountSchema = BaseCreatePamAccountSchema.omit({ - // We don't support pwd rotation for mysql yet - rotationEnabled: true, - rotationIntervalSeconds: true -}).extend({ - credentials: MySQLAccountCredentialsSchema +export const CreateMySQLAccountSchema = BaseCreatePamAccountSchema.extend({ + credentials: MySQLAccountCredentialsSchema, + //We don't support pwd rotation for mysql yet + rotationEnabled: z.boolean().optional(), + rotationIntervalSeconds: z.number().optional() }); -export const UpdateMySQLAccountSchema = BaseUpdatePamAccountSchema.omit({ - // We don't support pwd rotation for mysql yet - rotationEnabled: true, - rotationIntervalSeconds: true -}).extend({ +export const UpdateMySQLAccountSchema = BaseUpdatePamAccountSchema.extend({ credentials: MySQLAccountCredentialsSchema.optional() });