Sunnysideup\MigrateData\Tasks\TextOrJSONToRelationshipMigration
Used to debug a QueueJob.
@todo: UPGRADE: remove after upgrade
Synopsis
class TextOrJSONToRelationshipMigration
extends MigrateDataTaskBase
{
- // members
- protected string $title = 'Migrate Text Or JSON to Proper Relationship in DB';
- protected string $description = ' For example, it can convert all the values of all DB columnns used by listbox fields from comma separated strings to JSON and then to Many Many';
- protected boolean $enabled = true;
- protected array $sanitiseCharList = ;
- protected array $dbTablesTypes = ;
- protected array $lookupClassNames = ;
- protected array $tables = ;
- private static array $data_to_fix = ;
- // Inherited members from MigrateDataTaskBase
- protected string $title;
- protected string $description;
- protected boolean $enabled;
- protected $_schema;
- protected $_schemaForDataObject;
- // methods
- protected void performMigration()
- protected void updateRows()
- protected void updateRow()
- protected void updateEmptyRows()
- protected void addToRelationship()
- protected void sanitiseChars()
- protected void getTableName()
- protected void getLookupClassName()
- protected void testRelationships()
- // Inherited methods from MigrateDataTaskBase
- 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
Members
private
- $data_to_fix
—
array
add your data here, like this: ClassNameA OldField => NewRelation ClassNameB OldField => NewRelation.
protected
- $_schema
- $_schemaForDataObject
- $dbTablesTypes
- $description — string
- $description
- $enabled
- $enabled
- $lookupClassNames
- $sanitiseCharList
- $tables
- $title — string
- $title
Methods
protected
- addToRelationship()
- getLookupClassName()
- getTableName()
- performMigration()
- sanitiseChars()
- testRelationships()
- updateEmptyRows()
- updateRow()
- updateRows()
Inherited from Sunnysideup\MigrateData\Tasks\MigrateDataTaskBase
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()