1 package DBIx::Class::DeploymentHandler::VersionHandler::DatabaseToSchemaVersions;
3 use Method::Signatures::Simple;
5 with 'DBIx::Class::DeploymentHandler::HandlesVersioning';
7 has schema_version => (
13 has database_version => (
19 has to_version => ( # configuration
21 lazy_build => 1, # builder comes from another role...
22 # which is... probably not how we want it
25 sub _build_to_version { $_[0]->schema_version }
33 sub next_version_set {
38 $self->once(!$self->once);
40 if $self->database_version eq $self->to_version;
41 return [$self->database_version, $self->to_version];
44 sub previous_version_set {
49 $self->once(!$self->once);
51 if $self->database_version eq $self->to_version;
52 return [$self->database_version, $self->to_version];
56 __PACKAGE__->meta->make_immutable;
60 # vim: ts=2 sw=2 expandtab