From f98ebd19322e27d1b3f61b478a89189719c4882b Mon Sep 17 00:00:00 2001 From: Eric Kean Date: Mon, 14 Oct 2024 05:08:33 -0700 Subject: [PATCH] Remove old submission_confirmations --- .../removeOldSubmissionConfirmations.php | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 app/Console/Commands/removeOldSubmissionConfirmations.php diff --git a/app/Console/Commands/removeOldSubmissionConfirmations.php b/app/Console/Commands/removeOldSubmissionConfirmations.php new file mode 100644 index 00000000..db6660c2 --- /dev/null +++ b/app/Console/Commands/removeOldSubmissionConfirmations.php @@ -0,0 +1,58 @@ +subWeek(); + DB::table('submission_confirmations') + ->where('created_at', '<', $oneWeekAgo) + ->delete(); + } catch (Exception $e) { + echo $e->getMessage(); + $h = new Handler(app()); + $h->report($e); + return 1; + } + return 0; + } +}