I dont thing version storage can be in charge of installing itself
[dbsrgits/DBIx-Class-DeploymentHandler.git] / lib / DBIx / Class / DeploymentHandler / VersionStorage / Standard.pm
1 package DBIx::Class::DeploymentHandler::VersionStorage::Standard;
2 use Moose;
3 use Method::Signatures::Simple;
4
5 has schema => (
6   isa      => 'DBIx::Class::Schema',
7   is       => 'ro',
8   required => 1,
9 );
10
11 has version_rs => (
12   isa        => 'DBIx::Class::ResultSet',
13   is         => 'ro',
14   lazy_build => 1, # builder comes from another role...
15                    # which is... probably not how we want it
16   handles    => [qw( database_version version_storage_is_installed )],
17 );
18
19 with 'DBIx::Class::DeploymentHandler::HandlesVersionStorage';
20
21 sub _build_version_rs {
22    $_[0]->schema->set_us_up_the_bomb;
23    $_[0]->schema->resultset('__VERSION')
24 }
25
26 sub add_database_version { $_[0]->version_rs->create($_[1]) }
27
28 1;
29
30 __END__
31
32 vim: ts=2 sw=2 expandtab