patricmutwiri / archive
Archive database tables which have grown over time to different tables,time-suffixed, to free commonly-used tables of this dead weight.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/patricmutwiri/archive
Requires
- php: >=7.0
Requires (Dev)
- phpunit/phpunit: ^6
This package is auto-updated.
Last update: 2025-09-29 02:50:14 UTC
README
Archive database tables which have grown over time to different tables,time-suffixed, to free commonly-used tables of this dead weight.
Installation
To install through composer, simply put the following in your composer.json file:
{
"require": {
"patricmutwiri/archive": "dev-master"
}
}
$ composer update
Usage
$archive = new Patricmutwiri\Archive\Archive; echo $archive->getDatabases(); // > db1, db2, db3
Configs
DATABASES="db1"
TABLES="table1,table2,table3"
ARCHIVE_FROM="2015-12-31" // Archive from which date
ARCHIVE_TO="2000-01-01" // If this is empty, we'll archive all data from ARCHIVE_FROM.
DATE_COLUMN="datetimeadded,created_at,date_time_added" // the column to use as key for dates set in ARCHIVE_FROM and ARCHIVE_TO`
Licence
MIT