From: Arthur Axel 'fREW' Schmidt Date: Sun, 4 Jul 2010 05:47:59 +0000 (-0500) Subject: Add method which we can use for deploying without ddl X-Git-Tag: v0.001002~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c72832d7e13479886dbe0d3cfd1f444a8404523f;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git Add method which we can use for deploying without ddl --- diff --git a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm index 551c855..1a1fda8 100644 --- a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm +++ b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm @@ -135,6 +135,19 @@ method _ddl_schema_consume_filenames($type, $version) { $self->__ddl_consume_with_prefix($type, [ $version ], 'deploy') } +method _ddl_protoschema_deploy_consume_filenames($version) { + my $base_dir = $self->script_directory; + + my $dir = catfile( $base_dir, '_source', 'deploy', $version); + return [] unless -d $dir; + + opendir my($dh), $dir; + my %files = map { $_ => "$dir/$_" } grep { /\.yml$/ && -f "$dir/$_" } readdir $dh; + closedir $dh; + + return [@files{sort keys %files}] +} + method _ddl_protoschema_upgrade_consume_filenames($versions) { my $base_dir = $self->script_directory;