faster travis builds
[dbsrgits/DBIx-Class-DeploymentHandler.git] / lib / DBIx / Class / DeploymentHandler / HandlesDeploy.pm
index d5169a6..0a9dcb7 100644 (file)
@@ -1,4 +1,5 @@
 package DBIx::Class::DeploymentHandler::HandlesDeploy;
+
 use Moose::Role;
 
 # ABSTRACT: Interface for deploy methods
@@ -17,6 +18,8 @@ requires 'upgrade_single_step';
 requires 'prepare_downgrade';
 requires 'downgrade_single_step';
 
+requires 'txn_do';
+
 1;
 
 # vim: ts=2 sw=2 expandtab
@@ -108,6 +111,12 @@ Optionally return C<< [ $ddl, $upgrade_sql ] >> where C<$ddl> is the DDL for
 that version of the schema and C<$upgrade_sql> is the SQL that was run to
 upgrade the database.
 
+=method txn_do
+
+ $dh->txn_do(sub { ... })
+
+Wrap the passed coderef in a transaction (if transactions are enabled.)
+
 =head1 KNOWN IMPLEMENTATIONS
 
 =over