Make rotationIntervalSeconds nullable

This commit is contained in:
x032205
2025-10-21 16:21:52 -04:00
parent 65b36e6232
commit 85daaf806e
8 changed files with 12 additions and 11 deletions
@@ -10,7 +10,7 @@ export async function up(knex: Knex): Promise<void> {
) {
await knex.schema.alterTable(TableName.PamAccount, (t) => {
t.boolean("rotationEnabled").notNullable().defaultTo(false);
t.integer("rotationIntervalSeconds").notNullable();
t.integer("rotationIntervalSeconds").nullable();
t.timestamp("lastRotatedAt").nullable();
});
}
+1 -1
View File
@@ -20,7 +20,7 @@ export const PamAccountsSchema = z.object({
createdAt: z.date(),
updatedAt: z.date(),
rotationEnabled: z.boolean().default(false),
rotationIntervalSeconds: z.number().default(2592000),
rotationIntervalSeconds: z.number().nullable().optional(),
lastRotatedAt: z.date().nullable().optional()
});