Subject: | Error when DDL dir contains underscore |
Catched extraordinary behavior with this code:
use File::Temp qw/ tempdir /;
my $tempdir = tempdir( CLEANUP => 0 );
my $dh = DBIx::Class::DeploymentHandler->new({
schema => $schema,
script_directory => $tempdir,
ignore_ddl => 1,
});
$dh->prepare_install;
$dh->install
This code occasionally throws:
DBI Exception: DBD::SQLite::db do failed: table
dbix_class_deploymenthandler_versions already exists [for Statement
"CREATE TABLE dbix_class_deploymenthandler_versions...
After some debugging i've found that this error happens when tempdir
generates name with underscore in it. I believe the reason of this is
line 350 here - https://metacpan.org/source/FREW/DBIx-Class-
DeploymentHandler-
0.002112/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm
#L350
I have:
DBIx::Class::DeploymentHandler 0.002111
perl v5.8.8 built for x86_64-linux-thread-multi