schema => $s,
upgrade_directory => $sql_dir,
databases => ['SQLite'],
- sqltargs => { add_drop_table => 0 },
+ sql_translator_args => { add_drop_table => 0 },
});
ok( $dm, 'DBIC::DH::DM::SQL::Translator gets instantiated correctly' );
$dm->prepare_deploy;
+
+ mkpath(catfile(qw( t sql SQLite preinstall 1.0 )));
+ open my $prerun, '>',
+ catfile(qw( t sql SQLite preinstall 1.0 003-semiautomatic.pl ));
+ print {$prerun} "sub run {use File::Touch; touch(q(foobar));}";
+ close $prerun;
+ $dm->preinstall_scripts('1.0');
+
+ ok -e 'foobar';
+
{
my $warned = 0;
local $SIG{__WARN__} = sub{$warned = 1};
} 'schema not deployed';
mkpath catfile(qw( t sql _common schema 1.0 ));
- open my $common, '>',
+ open $common, '>',
catfile(qw( t sql _common schema 1.0 001-auto.sql ));
print {$common} qq<This will never get run>;
close $common;
schema => $s,
upgrade_directory => $sql_dir,
databases => ['SQLite'],
- sqltargs => { add_drop_table => 0 },
+ sql_translator_args => { add_drop_table => 0 },
txn_wrap => 1,
});
bar => 'frew',
baz => 'frew',
})
- } 'schema is downpgrayyed';
+ } 'schema is downgrayyed';
$dm->upgrade_single_step([qw( 1.0 2.0 )]);
}
schema => $s,
upgrade_directory => $sql_dir,
databases => ['SQLite'],
- sqltargs => { add_drop_table => 0 },
+ sql_translator_args => { add_drop_table => 0 },
txn_wrap => 0,
});