8 use aliased 'DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator';
9 use File::Spec::Functions;
10 use File::Path qw(rmtree mkpath);
12 my $db = 'dbi:SQLite:db.db';
13 my @connection = ($db, '', '', { ignore_version => 1 });
14 my $sql_dir = 't/sql';
19 use_ok 'DBICVersion_v1';
20 my $s = DBICVersion::Schema->connect(@connection);
21 my $dm = Translator->new({
23 script_directory => $sql_dir,
24 databases => ['SQLite'],
25 sql_translator_args => { add_drop_table => 0 },
33 use_ok 'DBICVersion_v2';
34 my $s = DBICVersion::Schema->connect(@connection);
35 my $dm = Translator->new({
37 script_directory => $sql_dir,
38 databases => ['SQLite'],
39 sql_translator_args => { add_drop_table => 0 },
43 $version = $s->schema_version();
45 mkpath(catfile(qw( t sql _preprocess_schema upgrade 1.0-2.0 )));
47 catfile(qw( t sql _preprocess_schema upgrade 1.0-2.0 003-semiautomatic.pl ));
52 if $_[0]->isa("SQL::Translator::Schema")
53 && $_[1]->isa("SQL::Translator::Schema");
56 $dm->prepare_upgrade({
57 from_version => '1.0',
59 version_set => [qw(1.0 2.0)]
61 ok -e 'robotparty', 'intermediate script ran with the right args';
62 $dm->upgrade_single_step({ version_set => [qw( 1.0 2.0 )] });
65 #vim: ts=2 sw=2 expandtab