X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FDeploymentHandler%2FVersionStorage%2FDeprecated.pm;h=2e0a9f699e962c1b4dd2e5459ab591cf6b6ab84a;hb=fe048ee301e219d737307f2b30e3bd88a7128df6;hp=6bce01401d310922ccf0aad9dbf0fde31b451f34;hpb=bcc722970a94f2ba2debdeb630168bde1f8a6830;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 6bce014..2e0a9f6 100644 --- a/lib/DBIx/Class/DeploymentHandler/VersionStorage/Deprecated.pm +++ b/lib/DBIx/Class/DeploymentHandler/VersionStorage/Deprecated.pm @@ -1,12 +1,15 @@ package DBIx::Class::DeploymentHandler::VersionStorage::Deprecated; use Moose; +use DBIx::Class::DeploymentHandler::Logger; +use Log::Contextual ':log', -package_logger => + DBIx::Class::DeploymentHandler::Logger->new({ + env_prefix => 'DBICDH' + }); -# 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, ); @@ -31,11 +34,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 { "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; @@ -76,3 +83,8 @@ new Standard VersionStorage: $dh->version_storage->add_database_vesion({ version => $_ }) for @versions; +=head1 SEE ALSO + +This class is an implementation of +L. Pretty much all the +documentation is there.