X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FDeploymentHandler%2FVersionStorage%2FDeprecated.pm;h=ca17fbcee89e60f0dca826a78f22a6e4d68f575a;hb=8465e76797613fa0b9c85365c03d26cacbaab31a;hp=f39460bd9f3bfd839638f302f58b2f8ab3f02a2d;hpb=e52174e31b95fe335f6ab8cfdbf23cc2a0c05673;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git diff --git a/lib/DBIx/Class/DeploymentHandler/VersionStorage/Deprecated.pm b/lib/DBIx/Class/DeploymentHandler/VersionStorage/Deprecated.pm index f39460b..ca17fbc 100644 --- a/lib/DBIx/Class/DeploymentHandler/VersionStorage/Deprecated.pm +++ b/lib/DBIx/Class/DeploymentHandler/VersionStorage/Deprecated.pm @@ -1,5 +1,14 @@ package DBIx::Class::DeploymentHandler::VersionStorage::Deprecated; use Moose; +use DBIx::Class::DeploymentHandler::Logger; +use Log::Contextual ':log', -default_logger => + DBIx::Class::DeploymentHandler::Logger->new({ + env_prefix => 'DBICDH' + }); + + +# ABSTRACT: (DEPRECATED) Use this if you are stuck in the past + use Method::Signatures::Simple; has schema => ( @@ -28,11 +37,15 @@ sub _build_version_rs { 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 { "[DBICDH] 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 { "[DBICDH] Deleting database version $version" }; + $_[0]->version_rs->search({ version => $version})->delete } __PACKAGE__->meta->make_immutable; @@ -43,6 +56,16 @@ __PACKAGE__->meta->make_immutable; __END__ +=head1 DEPRECATED + +I begrudgingly made this module (and other related modules) to keep porting +from L relatively simple. I will make changes +to ensure that it works with output from L 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