Download the PHP package heyday/laravel-anonymised-sql-dumps without Composer
On this page you can find all versions of the php package heyday/laravel-anonymised-sql-dumps. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download heyday/laravel-anonymised-sql-dumps
More information about heyday/laravel-anonymised-sql-dumps
Files in heyday/laravel-anonymised-sql-dumps
Package laravel-anonymised-sql-dumps
Short Description Generate anonymised SQL dumps for Laravel. Wrapper for ifsnop/mysqldump-php
License MIT
Homepage https://github.com/heyday/laravel-anonymised-sql-dumps
Informations about the package laravel-anonymised-sql-dumps
Laravel Anonymised SQL dumps
Essentially a wrapper around ifsnop/mysqldump-php that allows you to specify what columns to anonymise using Faker
Helpful tool to debug production DBs while staying GDPR compliant.
Installation
You can install the package via Composer:
In Laravel 5.5 and above, the package should autoregister the service provider. For Laravel 5.4 or below you must install this service provider to config/app.php
:
Publish the config file:
Update the published config file (config/anonymised-sql-dumps.php
) to match your DB structure (only the columns you want to anonymise) and specify a Faker property to replace original data, eg:
Usage
An artisan command should now be available.
The command to run is anonymised-db-dumps:export
and it takes one optional argument which is the name of the dump file.
The generated .sql file will be available in storage/dbdumps
.
TODO
- Make the DB connection as an option.
- Make the destination disk/path as an option.
- Allow more nesting for JSON columns.
- Automatic detection of common fields? (email, address, name, etc...)