xixaoly / randomizer
Randomize DB columns
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/xixaoly/randomizer
Requires
- php: >=5.6
- symfony/yaml: ^3.4
Requires (Dev)
- tracy/tracy: 2.4.*
This package is not auto-updated.
Last update: 2025-12-30 09:55:23 UTC
README
Simply DB data randomize.
Install
git clone git@github.com:xixaoly/Randomizer.gitcd Randomizercomposer update
CLI example
Create example.yml file with schema declaration and run php cli/randomizer.php example.yml
PHP example
Include composer autoload (like require 'vendor/autoload.php'), create Job and handle it
<?php use Randomizer\Randomizer; $randomizer = new Randomizer; $job = $randomizer->createJobFromFile($path); try { $randomizer->install($job); $randomizer->run($job); $randomizer->uninstall($job); } catch (Exception $e) { $randomizer->uninstall($job); }
Schema example
connection: dns: mysql:dbname=randomizer;host=127.0.0.1 name: root password: example options: defaultClass: class: Randomizer\Database\Mysql\Method\RandomString schema: table1: colm1: class: Randomizer\Database\Mysql\Method\RandomNumber arguments: min: 10 max: 20 colm2: class: Randomizer\Database\Mysql\Method\RandomString colm3: