people should use schema_from_schema_loader
Arthur Axel 'fREW' Schmidt [Wed, 29 Feb 2012 03:17:45 +0000 (21:17 -0600)]
Changes
lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm

diff --git a/Changes b/Changes
index fb2d744..2db8885 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,6 +1,9 @@
 Revision history for {{$dist->name}}
 
 {{$NEXT}}
+       - Added DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::ScriptHelpers,
+         ALL users who use perl scripts during migrations are encouraged to use
+         schema_from_schema_loader from that package.
 
 0.001008  2012-02-19 10:12:34 CST6CDT
        - Added dep on parent, bump dep on DBD::SQLite to avoid silly failures
index 5fb6918..e34a6b8 100644 (file)
@@ -897,7 +897,10 @@ A very basic perl script might look like:
  use strict;
  use warnings;
 
- sub {
+ use DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::ScriptHelpers
+    'schema_from_schema_loader';
+
+ schema_from_schema_loader({ naming => 'v4' }, sub {
    my $schema = shift;
 
    # [1] for deploy, [1,2] for upgrade or downgrade, probably used with _any
@@ -907,7 +910,12 @@ A very basic perl script might look like:
      name => 'root',
      password => 'root',
    })
- }
+ })
+
+Note that the above uses
+L<DBIx::Class::DeploymentHanlder::DeployMethod::SQL::Translator::ScriptHelpers/schema_from_schema_loader>.
+Using a raw coderef is strongly discouraged as it is likely to break as you
+modify your schema.
 
 =attr ignore_ddl