__PACKAGE__->mk_group_accessors( 'simple' => qw/config_dir
_inherited_attributes debug schema_class dumped_objects config_attrs/);
-our $VERSION = '1.001_029';
+our $VERSION = '1.001032';
$VERSION = eval $VERSION;
$fixup_visitor = new Data::Visitor::Callback(%callbacks);
}
+ my @sorted_source_names = $self->_get_sorted_sources( $schema );
$schema->storage->txn_do(sub {
$schema->storage->with_deferred_fk_checks(sub {
- my @sorted_source_names = $self->_get_sorted_sources( $schema );
foreach my $source (@sorted_source_names) {
$self->msg("- adding " . $source);
my $rs = $schema->resultset($source);
$self->msg("- updating sequence $sequence");
$rs->result_source->storage->dbh_do(sub {
my ($storage, $dbh, @cols) = @_;
- $self->msg(my $sql = "SELECT setval('${sequence}', (SELECT max($column) FROM ${table}));");
+ $self->msg(
+ my $sql = "SELECT setval('${sequence}', (SELECT max("
+ .$dbh->quote_identifier($column)
+ .") FROM "
+ .$dbh->quote_identifier(${table})
+ ."));"
+ );
my $sth = $dbh->prepare($sql);
my $rv = $sth->execute or die $sth->errstr;
$self->msg("- $sql");
Matt S. Trout <mst@shadowcatsystems.co.uk>
+ John Napiorkowski <jjnapiork@cpan.org>
+
Drew Taylor <taylor.andrew.j@gmail.com>
Frank Switalski <fswitalski@gmail.com>
Chris Akins <chris.hexx@gmail.com>
+ Tom Bloor <t.bloor@shadowcat.co.uk>
+
+ Samuel Kaufman <skaufman@cpan.org>
+
=head1 LICENSE
This library is free software under the same license as perl itself