From: Peter Rabbitson Date: Sun, 20 Apr 2008 22:18:28 +0000 (+0000) Subject: Add a proxy deploy_statements() method executable directly on $schema instead of... X-Git-Tag: v0.08240~480 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0e0ce6c12ab1e9ab2f0982ac7afed581b0075775;hp=b2df8400ca62494d62470ee9dcab84cd70cea3fc;p=dbsrgits%2FDBIx-Class.git Add a proxy deploy_statements() method executable directly on $schema instead of $schema->storage --- diff --git a/lib/DBIx/Class/Schema.pm b/lib/DBIx/Class/Schema.pm index ae0c427..df6131d 100644 --- a/lib/DBIx/Class/Schema.pm +++ b/lib/DBIx/Class/Schema.pm @@ -1038,6 +1038,30 @@ sub deploy { $self->storage->deploy($self, undef, $sqltargs, $dir); } +=head2 deployment_statements + +=over 4 + +=item Arguments: $rdbms_type + +=back + +Returns the SQL statements used by L and L. +C<$rdbms_type> provides the DBI database driver name for which the SQL +statements are produced. If not supplied, the type of the current schema storage +will be used. + +=cut + +sub deployment_statements { + my ($self, $rdbms_type) = @_; + + $self->throw_exception("Can't generate deployment statements without a storage") + if not $self->storage; + + $self->storage->deployment_statements($self, $rdbms_type); +} + =head2 create_ddl_dir (EXPERIMENTAL) =over 4