Skip to content

Releases: onamfc/laravel-database-archiver

v1.0.6 - General Release

11 Aug 21:35

Choose a tag to compare

Update the configuration file removing any unnecessary settings.

v1.0.5

11 Aug 19:45

Choose a tag to compare

Updated the default table names in the config file to prevent users from accidentally archiving tables with names that are likely to exist.

v1.0.4

04 Aug 18:20

Choose a tag to compare

The issue was that the service provider was using ../config/db-archiver.php which would look for the config file in the src/ directory, but the config file is actually in the root config/ directory. The correct path should be ../../config/db-archiver.php to go up two levels from src/Providers/ to reach the root directory, then into the config/ folder.

v1.0.3 - Namespace Update

04 Aug 18:16

Choose a tag to compare

This update addresses a critical issue where the package's classes were not being correctly loaded due to a mismatch between the declared namespaces within the PHP files and the psr-4 autoloading configuration in composer.json.

Problem Identified:

The composer.json file defined the base namespace as LaravelDbArchiver\ mapping to the src/ directory. However, many of the package's PHP files incorrectly used onamfc\LaravelDbArchiver as their root namespace. This discrepancy prevented Composer's autoloader from locating the classes, leading to "Class not found" errors upon installation in new projects.

Solution Implemented:

All PHP files within the src/ and tests/ directories have been updated to consistently use LaravelDbArchiver as their root namespace, aligning with the composer.json configuration.

Affected Files (Namespace Changed from onamfc\LaravelDbArchiver to LaravelDbArchiver):

  • src/Providers/DbArchiverServiceProvider.php
  • src/Models/ArchiveLog.php
  • src/Services/ArchiveService.php
  • src/Services/StorageManager.php
  • src/Formatters/JsonFormatter.php
  • src/Formatters/ParquetFormatter.php
  • src/Adapters/S3StorageAdapter.php
  • src/Adapters/LocalStorageAdapter.php
  • src/Commands/ArchiveAllCommand.php
  • src/Commands/ArchiveTableCommand.php
  • src/Commands/ArchiveStatusCommand.php
  • src/Exceptions/ArchiveException.php
  • src/Exceptions/StorageException.php
  • tests/Unit/ArchiveServiceTest.php
  • tests/Feature/ArchiveCommandTest.php

Action Required After Update:

After applying these changes (or updating the package), it is crucial to run composer dump-autoload in your project's root directory. This command regenerates Composer's autoloader files, ensuring that the corrected namespaces are properly recognized and the classes can be loaded.

v1.0.2

04 Aug 18:09

Choose a tag to compare

Update package and prepare for packagist release

v1.0.1 - Initial Release with Notes

25 Jul 21:36

Choose a tag to compare

We are excited to announce the initial release of the Laravel Database Archiver, a comprehensive package designed to efficiently archive database records to cold storage systems. This release provides robust features for managing historical data, ensuring data integrity, and optimizing database performance.

New Features

  • Multi-storage Support: Archive your data to various storage providers, including AWS S3 and local filesystem, with an extensible architecture for future integrations.
  • Multiple Formats: Export archived data in both JSON and Parquet formats, catering to different analytical and storage needs.
  • Configurable Archival Criteria: Define flexible criteria for record selection based on columns like created_at, status, or any custom conditions using operators and values, including Carbon-parseable strings.
  • Scheduled Archival: Seamlessly integrate with Laravel's Task Scheduler to automate archival processes at daily, weekly, monthly, or custom cron intervals.
  • Memory Efficient Processing: Handle large datasets without performance degradation by processing records in configurable chunks.
  • Comprehensive Logging: Track all archival operations with detailed logs stored in a dedicated archive_logs database table and through Laravel's standard file logging channels.
  • Artisan Commands: Utilize a set of easy-to-use Artisan commands for manual archival, status checks, and dry runs:
archive:table {table}: Archive records from a specific table.
archive:all: Archive records from all configured tables.
archive:status {table?}: Check the archival status of tables.
  • Multi-table Support: Configure and manage archival settings for multiple database tables independently.
  • Programmatic Usage: Integrate archival functionality directly into your application logic using the ArchiveService.

Initial Release

10 Jul 16:07

Choose a tag to compare

Initial Release Pre-release
Pre-release
v1.0.0

update package name