diff --git a/packages/server/src/db/schema/audit-log.ts b/packages/server/src/db/schema/audit-log.ts index 9b7231c64..2b08bde63 100644 --- a/packages/server/src/db/schema/audit-log.ts +++ b/packages/server/src/db/schema/audit-log.ts @@ -10,10 +10,10 @@ export const auditLog = pgTable( id: text("id") .primaryKey() .$defaultFn(() => nanoid()), - organizationId: text("organization_id") - .references(() => organization.id, { onDelete: "set null" }), - userId: text("user_id") - .references(() => user.id, { onDelete: "set null" }), + organizationId: text("organization_id").references(() => organization.id, { + onDelete: "set null", + }), + userId: text("user_id").references(() => user.id, { onDelete: "set null" }), userEmail: text("user_email").notNull(), userRole: text("user_role").notNull(), action: text("action").notNull(),