https://github.com/tag1consulting/database-noise
Drush script for generating database noise.
https://github.com/tag1consulting/database-noise
Last synced: about 1 month ago
JSON representation
Drush script for generating database noise.
- Host: GitHub
- URL: https://github.com/tag1consulting/database-noise
- Owner: tag1consulting
- Created: 2011-07-01T21:06:11.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2011-07-01T21:25:51.000Z (almost 14 years ago)
- Last Synced: 2025-02-05T02:56:20.840Z (3 months ago)
- Homepage: dbn
- Size: 102 KB
- Stars: 1
- Watchers: 33
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
Awesome Lists containing this project
README
REQUIREMENTS:
-------------
1) A Drupal 6 installation.
- Apply the supplied database.inc.patc if you'd like to support concurrency.2) Configure settings.php.
- See the included settings.php.example for an example of configuring
settings.php to use the dbn-write drush command.CONFIGURATION:
--------------
See settings.php.example for a sample configuration that will write valid data
to the Drupal comments table.The general configuration format is as follows:
$config['dbn_write_tables'] = array(
'TABLE_NAME' => array(
'FIELD_NAME' => array(
'callback' => 'FUNCTION',
'arguments' => array('ARG1', 'ARG2', '...', 'ARGN'),
'type' => 'text',
),
'FIELD2_NAME' => array(
'value' => 12345,
'type' => 'int',
),
),
'TABLE2_NAME' => ...
);Details:
o 'callback' must point to a valid function.
o 'arguments' is optional, define if your callback requires arguments.
o 'type' can be 'text', 'int', or 'float'.
o 'value' will be used if 'callback' is not defined.Included callbacks:
o dbn_random_string($length) # includes funky characters
o dbn_random_name($length) # includes friendly characters
o dbn_random_sentence($words) # $words space-seperated random_names
o dbn_random_paragraph($sentences) # a paragraph of n sentences
o dbn_random_paragraphs($paragraphs) # n paragraphs
o dbn_random_nid() # a valid, active nid
o dbn_random_uid() # a valid, active uidEXAMPLES:
---------
$ drush ena dbn # enable the dbn module (to make the drush command available)$ drush help dbn-write # see the inline help
$ drush dbnw --time=60 --child=10 # fork off 10 children all writing to the
# database for 60 seconds.