Skip to content

Commit

Permalink
Merge branch '24.05.02' into 24.05.10
Browse files Browse the repository at this point in the history
  • Loading branch information
mdnoble73 committed Jun 13, 2024
2 parents fcb723d + 4e35e4e commit 9521e02
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/web/cron/backupAspen.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
mkdir($backupDir, 700, true);
}

//Remove any backups older than 3 days
//Remove any backups older than 2 days
$currentFilesInBackup = scandir($backupDir);
$earliestTimeToKeep = time() - (3 * 24 * 60 * 60);
$earliestTimeToKeep = time() - (2 * 24 * 60 * 60);
foreach ($currentFilesInBackup as $file) {
$okToProcess = false;
if (strlen($file) > 4) {
Expand Down
2 changes: 2 additions & 0 deletions code/web/release_notes/24.05.02.MD
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

### Other Updates
- Update import script to ignore sandbox mode if not available. (*MDN*)
- Remove unused triggers from the database. (*MDN*)
- Only keep 2 days of backups on the server itself. (*MDN*)

## This release includes code contributions from
- ByWater Solutions
Expand Down
30 changes: 30 additions & 0 deletions code/web/sys/DBMaintenance/version_updates/24.05.02.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

/** @noinspection PhpUnused */
function getUpdates24_05_02(): array {
/** @noinspection SqlWithoutWhere */
return [
/*'name' => [
'title' => '',
'description' => '',
'continueOnError' => false,
'sql' => [
''
]
], //name*/

//mark - ByWater
'remove_used_triggers' => [
'title' => 'Remove Unused Triggers',
'description' => 'Remove Unused Triggers',
'continueOnError' => true,
'sql' => [
'DROP TRIGGER after_grouped_work_record_items_delete',
'DROP TRIGGER after_grouped_work_records_delete',
'DROP TRIGGER after_grouped_work_delete',
'DROP TRIGGER after_scope_delete',
]
], //remove_used_triggers

];
}

0 comments on commit 9521e02

Please sign in to comment.