X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=maint%2Fgen-schema.pl;h=e3faa85d8b41fb19852344d95589b8c991446f4f;hb=d9672fb94b70dac86a6d4fed7ad46a48c5ee4527;hp=b16bd159b9aad03c619b5ce3c561eaba9079cb18;hpb=0009fa4905ab7f4585c4b470bfe049666bce8e17;p=dbsrgits%2FDBIx-Class.git diff --git a/maint/gen-schema.pl b/maint/gen-schema.pl index b16bd15..e3faa85 100755 --- a/maint/gen-schema.pl +++ b/maint/gen-schema.pl @@ -1,22 +1,17 @@ -#!/usr/bin/perl +#!/usr/bin/env perl use strict; use warnings; use lib qw(lib t/lib); -use UNIVERSAL::require; +use DBICTest::Schema; +use SQL::Translator; -my $from = 'SQL::Translator::Parser::DBIx::Class'; -my $to = 'SQL::Translator::Producer::SQLite'; -my $sqlt = 'SQL::Translator'; -my $schema = 'DBICTest::Schema'; - -$from->require; -$to->require; -$sqlt->require; -$schema->require; - -my $tr = $sqlt->new; - -$from->can("parse")->($tr, $schema); -print $to->can("produce")->($tr); +my $schema = DBICTest::Schema->connect; +print scalar ($schema->storage->deployment_statements( + $schema, + 'SQLite', + undef, + undef, + { producer_args => { no_transaction => 1 } } +));