Commit | Line | Data |
e70a1600 |
1 | package DBIx::Class::DeploymentHandler::DatabaseToSchemaVersions; |
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 |
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 | |
27 | 1; |
28 | |
29 | __END__ |
30 | |
31 | vim: ts=2 sw=2 expandtab |