Added deploy to Storage, DBICTEST_SQLT_DEPLOY env var for tests
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Schema.pm
index 3b7418e..b2c9775 100644 (file)
@@ -428,6 +428,18 @@ sub throw_exception {
   croak @_;
 }
 
+=head2 deploy
+
+Attempts to deploy the schema to the current storage
+
+=cut
+
+sub deploy {
+  my ($self) = shift;
+  $self->throw_exception("Can't deploy without storage") unless $self->storage;
+  $self->storage->deploy($self);
+}
+
 1;
 
 =head1 AUTHORS