DNADesign\Populate\PopulateMySQLExportExtension
An extension for {@link Populate} which, when applied, exports the result of the database to a file path on the server through mysqldump.
This is useful for situations like unit tests where you want to import state
but want the speed of using direct mysql queries.
Opt into this extension by adding this to your populate.yml configuration.
<code>
PopulateMySQLExportExtension:
export_db_path: ~/path.sql
Populate:
extensions
- PopulateMySQLExportExtension
</code>
Synopsis
class PopulateMySQLExportExtension
extends Extension
{
- // members
- private static $export_db_path;
- // methods
- public void getPath()
- public void onAfterPopulateRecords()
Hierarchy
Extends
- SilverStripe\Core\Extension
Uses
- SilverStripe\Core\Config\Configurable
Members
private
- $export_db_path