Class::DBI::DataMigration Getting Your Data From There to Here #10

Data::Dumper notation

{
   'target_connection' => {
       'username' => 'me',
       'base_class' => 'Legacy::DBI',
       'password' => 'foobar',
       'db_name' => 'dbi:mysql:legacy'
   },
   'source_connection' => {
       'username' => 'me',
       'base_class' => 'New::DBI',
       'password' => 'foobar',
       'db_name' => 'dbi:mysql:new'
   },
   'entities' => {
       'Legacy::DBI::Games' => {
           'target_cdbi_class' => 'New::DBI::Game',
           'mappings' => {
               'game_keywords' => {
                   'target_key' => 'search_data'
               },
               'game_url' => {
                   'target_key' => 'website'
               },
               'game_name' => {
                   'target_key' => 'name'
               }
           }
       }
   }
}
Copyright © 2005 Dan Friedman (Powered by Spork)