$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");