Sunnysideup\MigrateData\Tasks\MigrateDataTaskBase
Synopsis
class MigrateDataTaskBase
extends BuildTask
{
- // members
- protected string $title = 'Abstract Migration Class';
- protected string $description = 'Please extend this class';
- protected boolean $enabled = false;
- protected $_schema;
- protected $_schemaForDataObject;
- private array $_cacheTableExists = ;
- private array $_cacheFieldExists = ;
- // methods
- public void run()
- protected abstract void performMigration()
- protected void runMoveData()
- protected void migrateSimple()
- // Inherited methods from HelperMethods
- public void deleteObject()
- protected void runSQLQueries()
- protected void runUpdateQuery()
- protected void runPublishClasses()
- protected void makeTableObsolete()
- protected void tableExists()
- protected void fieldExists()
- protected void renameField()
- protected void getSchema()
- protected void getSchemaForDataObject()
- protected void getListOfIDs()
- protected void getListAsIterableQuery()
- protected void writeObject()
- protected void writePage()
Hierarchy
Extends
- SilverStripe\Dev\BuildTask
Uses
- Sunnysideup\Flush\FlushNow
- Sunnysideup\MigrateData\Traits\HelperMethods
Members
private
- $_cacheFieldExists
- $_cacheTableExists
protected
- $_schema
- $_schemaForDataObject
- $description
- $enabled
- $title
Methods
protected
- migrateSimple() — Migrates data from one table to another.
- performMigration() — Queries the config for Migrate definitions, and runs migrations if you extend this task then overwrite it this method.
- runMoveData() — data needs to be in this format: [ 'include_inserts' => true|false, #assumed true if not provided 'old_table' => 'foo', 'new_table' => 'bar' (can be the same!).
public
Inherited from Sunnysideup\MigrateData\Traits\HelperMethods
protected
- fieldExists()
- getListAsIterableQuery()
- getListOfIDs()
- getSchema()
- getSchemaForDataObject()
- makeTableObsolete()
- renameField()
- runPublishClasses()
- runSQLQueries()
- runUpdateQuery()
- tableExists()
- writeObject()
- writePage()