1 package DBIx::Class::DeploymentHandler::VersionStorage::Standard;
3 use Method::Signatures::Simple;
6 isa => 'DBIx::Class::Schema',
12 isa => 'DBIx::Class::ResultSet',
15 handles => [qw( database_version version_storage_is_installed )],
18 with 'DBIx::Class::DeploymentHandler::HandlesVersionStorage';
20 sub _build_version_rs {
21 $_[0]->schema->register_class(
23 'DBIx::Class::DeploymentHandler::VersionStorage::Standard::VersionResult'
25 $_[0]->schema->resultset('__VERSION')
28 sub add_database_version { $_[0]->version_rs->create($_[1]) }
30 sub delete_database_version {
31 $_[0]->version_rs->search({ version => $_[1]->{version}})->delete
34 __PACKAGE__->meta->make_immutable;
42 You started your project and weren't using DBICDH? FOOL! Lucky for you I had
43 you in mind when I wrote this doc <3
45 First off, you'll want to just install the version_storage:
47 my $s = My::Schema->connect(...);
48 my $dh = DeployHandler({ schema => $s });
50 $dh->prepare_version_storage_install;
51 $dh->install_version_storage;
53 Then, bump your schema version, and you can use DBICDH like normal!
55 vim: ts=2 sw=2 expandtab