package DBIx::Class::DeploymentHandler::VersionStorage::Standard;
use Moose;
+
+# ABSTRACT: Version storage that does the normal stuff
+
use Method::Signatures::Simple;
has schema => (
has version_rs => (
isa => 'DBIx::Class::ResultSet',
is => 'ro',
- lazy_build => 1, # builder comes from another role...
- # which is... probably not how we want it
+ lazy_build => 1,
handles => [qw( database_version version_storage_is_installed )],
);
with 'DBIx::Class::DeploymentHandler::HandlesVersionStorage';
sub _build_version_rs {
- $_[0]->schema->set_us_up_the_bomb;
- $_[0]->schema->resultset('__VERSION')
+ $_[0]->schema->register_class(
+ __VERSION =>
+ 'DBIx::Class::DeploymentHandler::VersionStorage::Standard::VersionResult'
+ );
+ $_[0]->schema->resultset('__VERSION')
}
sub add_database_version { $_[0]->version_rs->create($_[1]) }
+sub delete_database_version {
+ $_[0]->version_rs->search({ version => $_[1]->{version}})->delete
+}
+
+__PACKAGE__->meta->make_immutable;
+
1;
+# vim: ts=2 sw=2 expandtab
+
__END__
-vim: ts=2 sw=2 expandtab