require DBIx::Class::Storage; # loaded for type constraint
use autodie;
use File::Path;
+use DBIx::Class::DeploymentHandler::Types;
+
with 'DBIx::Class::DeploymentHandler::HandlesDeploy';
my $guard = $self->schema->txn_scope_guard if $self->txn_wrap;
- foreach my $line (
- map @{$self->_read_sql_file($_)}, @{$self->_ddl_schema_consume_filenames(
+ my @sql = map @{$self->_read_sql_file($_)}, @{$self->_ddl_schema_consume_filenames(
$self->storage->sqlt_type,
$self->schema_version
- )}
- ) {
+ )};
+
+ foreach my $line (@sql) {
$storage->_query_start($line);
try {
# do a dbh_do cycle here, as we need some error checking in
}
$guard->commit if $self->txn_wrap;
+ return join "\n", @sql;
}
sub prepare_install {
%{$sqltargs}
});
- my $sqlt_schema = $sqlt->translate({ data => $schema })
+ my $sqlt_schema = $sqlt->translate( data => $schema )
or $self->throw_exception($sqlt->error);
foreach my $db (@$databases) {
my $sqlt = SQL::Translator->new( $sqltargs );
$sqlt->parser('SQL::Translator::Parser::DBIx::Class');
- my $sqlt_schema = $sqlt->translate({ data => $schema })
+ my $sqlt_schema = $sqlt->translate( data => $schema )
or $self->throw_exception ($sqlt->error);
foreach my $db (@$databases) {