From: Jess Robinson Date: Fri, 18 Aug 2006 11:03:25 +0000 (+0000) Subject: Allow deploy to supply a directory for the SQL file to deploy from (Penguin) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6e73ac255869e7fb3149915fb3fea41cc9507f43;p=dbsrgits%2FDBIx-Class-Historic.git Allow deploy to supply a directory for the SQL file to deploy from (Penguin) --- diff --git a/lib/DBIx/Class/Schema.pm b/lib/DBIx/Class/Schema.pm index d35b211..5d5070c 100644 --- a/lib/DBIx/Class/Schema.pm +++ b/lib/DBIx/Class/Schema.pm @@ -694,7 +694,7 @@ sub throw_exception { =over 4 -=item Arguments: $sqlt_args +=item Arguments: $sqlt_args, $dir =back @@ -710,9 +710,9 @@ produced include a DROP TABLE statement for each table created. =cut sub deploy { - my ($self, $sqltargs) = @_; + my ($self, $sqltargs, $dir) = @_; $self->throw_exception("Can't deploy without storage") unless $self->storage; - $self->storage->deploy($self, undef, $sqltargs); + $self->storage->deploy($self, undef, $sqltargs, $dir); } =head2 create_ddl_dir (EXPERIMENTAL) @@ -731,8 +731,7 @@ across all databases, or fully handle complex relationships. =cut -sub create_ddl_dir -{ +sub create_ddl_dir { my $self = shift; $self->throw_exception("Can't create_ddl_dir without storage") unless $self->storage; @@ -748,8 +747,7 @@ intended for direct end user use. =cut -sub ddl_filename -{ +sub ddl_filename { my ($self, $type, $dir, $version) = @_; my $filename = ref($self); @@ -770,4 +768,3 @@ Matt S. Trout You may distribute this code under the same terms as Perl itself. =cut -