X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FDeploymentHandler%2FDeployMethod%2FSQL%2FTranslator.pm;h=551c8558a2da1112cc2b3cc57263e3f3e2c66969;hb=d3d6512cf7768478349c9f2264ba823013831283;hp=52e6b23c94e54a238e91f453eef36e38da7108f2;hpb=c4f51462ef3831ad5e95b53de672a853014576dc;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git diff --git a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm index 52e6b23..551c855 100644 --- a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm +++ b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm @@ -221,7 +221,7 @@ method _run_sql_array($sql) { } catch { die "$_ (running line '$line')" - } + }; $storage->_query_end($line); } return join "\n", @$sql @@ -455,7 +455,7 @@ sub _resultsource_protoschema_filename { my ($self, $source_name) = @_; return sub { my ($self, $version) = @_; - my $dirname = catfile( $self->script_directory, '_source', $version ); + my $dirname = catfile( $self->script_directory, '_source', 'deploy', $version ); mkpath($dirname) unless -d $dirname; return catfile( $dirname, "001-auto-$source_name.yml" ); @@ -495,7 +495,10 @@ sub prepare_resultsource_install { sub prepare_deploy { log_info { 'preparing deploy' }; my $self = shift; - $self->prepare_protoschema({}, '_ddl_protoschema_produce_filename'); + $self->prepare_protoschema({ + # Exclude __VERSION so that it gets installed separately + parser_args => { sources => [grep { $_ ne '__VERSION' } $self->schema->sources], } + }, '_ddl_protoschema_produce_filename'); $self->_prepare_install({}, '_ddl_protoschema_produce_filename', '_ddl_schema_produce_filename'); }