namespace reorg
[dbsrgits/DBIx-Class-DeploymentHandler.git] / lib / DBIx / Class / DeploymentHandler / VersionHandler / DatabaseToSchemaVersions.pm
1 package DBIx::Class::DeploymentHandler::VersionHandler::DatabaseToSchemaVersions;
2 use Moose;
3 use Method::Signatures::Simple;
4
5 with 'DBIx::Class::DeploymentHandler::HandlesVersioning';
6
7 has once => (
8   is      => 'rw',
9   isa     => 'Bool',
10   default => undef,
11 );
12
13 sub next_version_set {
14   my $self = shift;
15   return undef
16     if $self->once;
17
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];
22 }
23
24
25 __PACKAGE__->meta->make_immutable;
26
27 1;
28
29 __END__
30
31 vim: ts=2 sw=2 expandtab