protected function CommerceMigrateExampleMigration::buildMap in Commerce Migrate 7
Create a map object for tracking the relationships between source rows.
Parameters
array $destination_schema: Values of any MigrateDestination::getKeySchema().
4 calls to CommerceMigrateExampleMigration::buildMap()
- CommerceExampleOrderMigration::__construct in commerce_migrate_example/
migrations/ order.inc - General initialization of a Migration object.
- CommerceExampleProductDisplayMigration::__construct in commerce_migrate_example/
migrations/ product_display.inc - General initialization of a Migration object.
- CommerceExampleProductLineItemMigration::__construct in commerce_migrate_example/
migrations/ product_line_item.inc - General initialization of a Migration object.
- CommerceExampleProductMigration::__construct in commerce_migrate_example/
migrations/ product.inc - General initialization of a Migration object.
File
- commerce_migrate_example/
migrations/ abstractions/ migration.inc, line 56 - A simple base class that contains things common to all CommerceMigrateExample classes.
Class
- CommerceMigrateExampleMigration
- Class CommerceMigrateExampleMigration.
Code
protected function buildMap($destination_schema) {
// Create a map object for tracking the relationships between source rows.
// The first column in CSV - the primary index.
$columns = static::csvColumns();
$this->map = new \MigrateSQLMap($this->machineName, array(
key($columns) => array(
'type' => 'varchar',
'length' => 24,
'not null' => TRUE,
'description' => current($columns),
),
), $destination_schema);
}