2017 © Pedro Peláez
 

library randomizer

Randomize DB columns

image

xixaoly/randomizer

Randomize DB columns

  • Sunday, April 8, 2018
  • by xixaoly
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Randomizer

Simply DB data randomize., (*1)

Install

  • git clone git@github.com:xixaoly/Randomizer.git
  • cd Randomizer
  • composer update

CLI example

Create example.yml file with schema declaration and run php cli/randomizer.php example.yml, (*2)

PHP example

Include composer autoload (like require 'vendor/autoload.php'), create Job and handle it, (*3)

<?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:

The Versions

08/04 2018

dev-master

9999999-dev

Randomize DB columns

  Sources   Download

The Requires

 

The Development Requires

08/04 2018

1.0.0

1.0.0.0

Randomize DB columns

  Sources   Download

The Requires

 

The Development Requires