package DBIx::Class::DeploymentHandler::VersionStorage::Deprecated;
use Moose;
+use DBIx::Class::DeploymentHandler::LogImporter ':log';
-# ABSTRACT: (DEPRECATED) Use this if you are stuck in the past
-use Method::Signatures::Simple;
+# ABSTRACT: (DEPRECATED) Use this if you are stuck in the past
has schema => (
- isa => 'DBIx::Class::Schema',
is => 'ro',
required => 1,
);
sub add_database_version {
# deprecated doesn't support ddl or upgrade_ddl
- $_[0]->version_rs->create({ version => $_[1]->{version} })
+ my $version = $_[1]->{version};
+ log_debug { "Adding database version $version" };
+ $_[0]->version_rs->create({ version => $version })
}
sub delete_database_version {
- $_[0]->version_rs->search({ version => $_[1]->{version}})->delete
+ my $version = $_[1]->{version};
+ log_debug { "Deleting database version $version" };
+ $_[0]->version_rs->search({ version => $version})->delete
}
__PACKAGE__->meta->make_immutable;
__END__
+=head1 DEPRECATED
+
+I begrudgingly made this module (and other related modules) to keep porting
+from L<DBIx::Class::Schema::Versioned> relatively simple. I will make changes
+to ensure that it works with output from L<DBIx::Class::Schema::Versioned> etc,
+but I will not add any new features to it.
+
+Once I hit major version 1 usage of this module will emit a warning.
+On version 2 it will be removed entirely.
+
=head1 THIS SUCKS
Here's how to convert from that crufty old Deprecated VersionStorage to a shiny
$dh->version_storage->add_database_vesion({ version => $_ })
for @versions;
+=head1 SEE ALSO
+
+This class is an implementation of
+L<DBIx::Class::DeploymentHandler::HandlesVersionStorage>. Pretty much all the
+documentation is there.