my $deploy = sub {
my $line = shift;
- return if(!$line || $line =~ /^--|^BEGIN TRANSACTION|^COMMIT|^\s+$/);
+ # the \nCOMMIT below is entirely to make the tests quieter,
+ # there is surely a better way to fix it (/m breaks everything)
+ return if(!$line || $line =~ /^(--|BEGIN TRANSACTION|\nCOMMIT|\s+$)/);
$storage->_query_start($line);
try {
# do a dbh_do cycle here, as we need some error checking in
__END__
-vim: ts=2,sw=2,expandtab
+vim: ts=2 sw=2 expandtab
databases => $self->databases,
upgrade_directory => $self->upgrade_directory,
sqltargs => $self->sqltargs,
- storage => $self->storage,
do_backup => $self->do_backup,
};
$args->{backup_directory} = $self->backup_directory
use DBICTest;
use DBIx::Class::DeploymentHandler;
my $db = 'dbi:SQLite:db.db';
+my @connection = ($db, '', '', { ignore_version => 1 });
my $sql_dir = 't/sql';
unlink 'db.db' if -e 'db.db';
VERSION1: {
use_ok 'DBICVersion_v1';
- my $s = DBICVersion::Schema->connect($db);
+ my $s = DBICVersion::Schema->connect(@connection);
ok($s, 'DBICVersion::Schema 1.0 instantiates correctly');
my $handler = DBIx::Class::DeploymentHandler->new({
upgrade_directory => $sql_dir,
schema => $s,
databases => 'SQLite',
+ sqltargs => { add_drop_table => 0 },
});
ok($handler, 'DBIx::Class::DeploymentHandler w/1.0 instantiates correctly');
VERSION2: {
use_ok 'DBICVersion_v2';
- my $s = DBICVersion::Schema->connect($db);
+ my $s = DBICVersion::Schema->connect(@connection);
ok($s, 'DBICVersion::Schema 2.0 instantiates correctly');
my $handler = DBIx::Class::DeploymentHandler->new({
upgrade_directory => $sql_dir,
VERSION3: {
use_ok 'DBICVersion_v3';
- my $s = DBICVersion::Schema->connect($db);
+ my $s = DBICVersion::Schema->connect(@connection);
ok($s, 'DBICVersion::Schema 3.0 instantiates correctly');
my $handler = DBIx::Class::DeploymentHandler->new({
upgrade_directory => $sql_dir,
done_testing;
__END__
-vim: ts=2,sw=2,expandtab
+vim: ts=2 sw=2 expandtab