DBIx-Schema-UpToDate
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/DBIx/Schema/UpToDate.pm view on Meta::CPAN
$dbh->do('INSERT INTO ' . $self->quoted_table_name .
' (' .
join(', ', $self->quote_identifiers(qw(version updated)))
. ') VALUES(?, ?)',
{}, $version, time()
)
or croak $dbh->errstr;
}
sub updates {
my ($self) = @_;
return $self->{updates} ||= [
];
}
sub update_to_version {
my ($self, $version) = @_;
$self->begin_work();
# execute updates to bring database to $version
$self->updates->[$version - 1]->($self);
# save the version now in case we get interrupted before the next commit
$self->set_version($version);
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.677 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )