The Solution - YAML
- Add our custom mapping to our YAML file:
---
source_connection:
base_class: New::DBI
db_name: dbi:mysql:new
username: user
password: password
target_connection:
base_class: Legacy::DBI
db_name: dbi:mysql:legacy
username: user
password: password
entities:
Legacy::DBI::Games:
target_cdbi_class: New::DBI::Game
mappings:
game_name:
target_key: name
game_keywords:
target_key: search_data
game_url:
target_key: website
game_genre:
target_key: game_type
mapping:
class: Class::DBI::DataMigration::Mapping::HasAToHasA
config:
target_class: New::DBI::GameType
target_class_search_key: name
matching_source_key: game_genre->game_genre_name
game_vendor:
target_key: publisher
mapping:
class: Legacy::Mapping::GameVendorToPublisher