Commit | Line | Data |
---|---|---|
c703d15d | 1 | package DBIx::Class::DeploymentHandler::VersionHandler::DatabaseToSchemaVersions; |
e70a1600 | 2 | use Moose; |
3 | use Method::Signatures::Simple; | |
4 | ||
24794769 | 5 | with 'DBIx::Class::DeploymentHandler::HandlesVersioning'; |
2440e311 | 6 | |
24794769 | 7 | has once => ( |
8 | is => 'rw', | |
9 | isa => 'Bool', | |
10 | default => undef, | |
e70a1600 | 11 | ); |
12 | ||
24794769 | 13 | sub 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 | |
fb105cfa | 20 | if $self->database_version eq $self->to_version; |
21 | return [$self->database_version, $self->to_version]; | |
e70a1600 | 22 | } |
23 | ||
e70a1600 | 24 | |
25 | __PACKAGE__->meta->make_immutable; | |
26 | ||
27 | 1; | |
28 | ||
29 | __END__ | |
30 | ||
31 | vim: ts=2 sw=2 expandtab |