feat(database): set default value for logCleanupCron and update existing records

- Added SQL script to set default value for "logCleanupCron" in "user_temp" table.
- Updated existing records with NULL "logCleanupCron" to the new default value.
- Updated user schema to reflect the default value for "logCleanupCron".
- Enhanced log cleanup functionality with error handling and logging.
This commit is contained in:
Mauricio Siu
2025-06-19 23:32:49 -06:00
parent 1089a8247d
commit a788a73fa3
7 changed files with 5735 additions and 2 deletions

View File

@@ -825,6 +825,9 @@ export const settingsRouter = createTRPCRouter({
}),
)
.mutation(async ({ input }) => {
if (IS_CLOUD) {
return true;
}
if (input.cronExpression) {
return startLogCleanup(input.cronExpression);
}