Recommend this page to a friend! |
Classes of Martin Latter | PHP Database Fill | README.md | Download |
|
DownloadThis repo is shoved into retirement. The schema file parsing and single-threaded nature of PHP, along with high memory usage makes this package obsolete.More efficient alternatives are MySQL-Filler and mysql_random_data_load.<br> <hr> <br> Database FillerPopulate MySQL database tables with test data by parsing the SQL schema file.Purpose
<br> [1]: https://tinram.github.io/images/databasefiller-data.png ![Database-Filler database][1] <br> BackgroundOriginally, I needed to populate a database containing 14 complex tables. Tools such as Spawner are ideal for populating small tables, but in this case, specifying the datatypes for 300+ fields to initiate Spawner would have been insanity. Instead, why not parse the SQL schema? [2]: https://tinram.github.io/images/databasefiller-execute.png ![Database-Filler execute][2] Database Requirements
Other
Further OptionsConfiguration boolean toggles (
Set-upEnsure the database already exists in MySQL e.g. for the test schema:
Adjust the array connection details and parameters in the file databasefiller_example.php Then execute this file with PHP on the command-line:
or run the file through a web server e.g.
Other ProjectsSQLParser would have been used in this project had it been available in 2014. LicenseDatabase Filler is released under the GPL v.3. |