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

The script code's STILL the same!

use Class::DBI::DataMigration::Migrator;
use Legacy::DBI::Games;
use New::DBI::Game;

open YAML, 'config.yaml' or die $!;
my $migrator = new Class::DBI::DataMigration::Migrator(join '', <YAML>);

my @source_objects = Legacy::DBI::Games->retrieve_all;
my $target_objects = $migrator->migrate_objects(\@source_objs);

# Now $target_objects point at the right game_types *and* the right publishers,
# and new game_edits rows have been created for each game
Copyright © 2005 Dan Friedman (Powered by Spork)