1 package DBIx::Class::DeploymentHandler::VersionHandler::DatabaseToSchemaVersions;
4 # ABSTRACT: Go straight from Database to Schema version
6 use Method::Signatures::Simple;
8 with 'DBIx::Class::DeploymentHandler::HandlesVersioning';
10 has schema_version => (
16 has database_version => (
22 has to_version => ( # configuration
28 sub _build_to_version { $_[0]->schema_version }
36 sub next_version_set {
41 $self->once(!$self->once);
43 if $self->database_version eq $self->to_version;
44 return [$self->database_version, $self->to_version];
47 sub previous_version_set {
52 $self->once(!$self->once);
54 if $self->database_version eq $self->to_version;
55 return [$self->database_version, $self->to_version];
59 __PACKAGE__->meta->make_immutable;
63 # vim: ts=2 sw=2 expandtab