move some general comments to a general role, along with the interface, and initial...
[dbsrgits/DBIx-Class-DeploymentHandler.git] / lib / DBIx / Class / DeploymentHandler / DatabaseToSchemaVersions.pm
CommitLineData
e70a1600 1package DBIx::Class::DeploymentHandler::DatabaseToSchemaVersions;
2use Moose;
3use Method::Signatures::Simple;
4
24794769 5with 'DBIx::Class::DeploymentHandler::HandlesVersioning';
2440e311 6
24794769 7has once => (
8 is => 'rw',
9 isa => 'Bool',
10 default => undef,
e70a1600 11);
12
24794769 13sub next_version_set {
14 my $self = shift;
15 return undef
16 if $self->once;
e70a1600 17
24794769 18 $self->once(!$self->once);
19 return undef
20 if $self->db_version eq $self->to_version;
21 return [$self->db_version, $self->to_version];
e70a1600 22}
23
e70a1600 24
25__PACKAGE__->meta->make_immutable;
26
271;
28
29__END__
30
31vim: ts=2 sw=2 expandtab