initial commit

This commit is contained in:
2026-06-25 13:03:45 +06:00
commit 4589f4a8d0
3229 changed files with 941958 additions and 0 deletions

View File

@@ -0,0 +1,106 @@
/*
Generate Access Info
* Command:
* Console/cake Backup generateAccessInfo
*
* Description:
* Generates access information for expense records created before
* 25 February 2018. This prepares historical records for further
* backup and archival processing.
*
* Execution Frequency:
* Run **only once**.
*
* Purpose:
* - Prepares old expense records for backup and archival.
* - Ensures access information is available for subsequent backup commands.
*
* Usage Notes:
* - Intended for one-time execution during initial setup.
* - Verify database connectivity before running the command.
*/
/*
Shift Expired Records
* Command:
* Console/cake Backup shiftExpiredRecords <month>
*
* Description:
* Identifies expired records and moves them into the `expired_records` table.
* After shifting, all corresponding records are deleted from the `access_info` table.
*
* Execution Frequency:
* Recommended to run once every hour.
*
* Purpose:
* - Prepares expired records for backup processing.
* - Keeps the `access_info` table clean and up-to-date.
*
* Usage:
* Run this command to backup a specific expense on demand.
* Example:
* Console/cake Backup shiftExpiredRecords 4
* Usage Notes:
* - Suitable for scheduled execution via cron.
* - Ensure database connectivity before running this command.
*/
/*
Bulk Expense Backup
* Command:
* Console/cake Backup initiateBackup <limit>
*
* Description:
* Scans the `expired_records` table and moves the records into the backup tables.
* After successfully taking the backup, the records are deleted from the `expired_records` table.
*
* Execution Frequency:
* Recommended to run once every six hours.
*
* Purpose:
* - Transfers expired records from live tables to backup tables.
* - Keeps the `expired_records` table from growing indefinitely.
*
* Usage:
* Run this command to backup a specific expense on demand.
* Example:
* Console/cake Backup initiateBackup 100
*
* Usage Notes:
* - Suitable for scheduled execution via cron.
* - Ensure database backups are functioning correctly before running this command.
* - Recommended to run during low-traffic periods to minimize load.
*/
/*
Single Expense Backup
* Command:
* Console/cake Backup backupSingleExpense <unique_url>
*
* Description:
* Backs up a single expense record from the live tables to the backup tables
* in the production database. This is useful for manually backing up
* individual records without running bulk backup operations.
*
* Parameters:
* <unique_url> The unique identifier of the expense to be backed up.
*
* Usage:
* Run this command to backup a specific expense on demand.
* Example:
* Console/cake Backup backupSingleExpense 1ILcOUb0fe3JpgB
*
* Purpose:
* - Supports targeted backup of individual expense records.
* - Helps ensure important records are safely copied to backup tables.
*
* Notes:
* - Ensure the record exists in the live tables before running the command.
*/