package DBIx::Class::DeploymentHandler::VersionHandler::Monotonic;
+
use Moose;
+
+# ABSTRACT: Obvious version progressions
+
use Carp 'croak';
with 'DBIx::Class::DeploymentHandler::HandlesVersioning';
sub previous_version_set {
my $self = shift;
- if ($self->to_vesion > $self->_version) {
+ if ($self->to_version > $self->_version) {
croak "you are trying to downgrade and your current version is less\n".
"than the version you are trying to downgrade to. Either upgrade\n".
"or update your schema"
return undef
} else {
$self->_dec_version;
- return [$self->_version, $self->_version + 1];
+ return [$self->_version + 1, $self->_version];
}
}
sub next_version_set {
my $self = shift;
- if ($self->to_vesion < $self->_version) {
+ if ($self->to_version < $self->_version) {
croak "you are trying to upgrade and your current version is greater\n".
"than the version you are trying to upgrade to. Either downgrade\n".
"or update your schema"
1;
+# vim: ts=2 sw=2 expandtab
+
__END__
-vim: ts=2 sw=2 expandtab
+=head1 SEE ALSO
+
+This class is an implementation of
+L<DBIx::Class::DeploymentHandler::HandlesVersioning>. Pretty much all the
+documentation is there.