1 package DBIx::Class::DeploymentHandler::HandlesVersionStorage;
5 # ABSTRACT: Interface for version storage methods
7 requires 'add_database_version';
8 requires 'database_version';
9 requires 'delete_database_version';
10 requires 'version_storage_is_installed';
14 # vim: ts=2 sw=2 expandtab
20 Typically VersionStorages will be implemented with a simple
21 DBIx::Class::Result. Take a look at the
22 L<two existing implementations|/KNOWN IMPLEMENTATIONS> for examples of what you
23 might want to do in your own storage.
25 =method add_database_version
27 $dh->add_database_version({
29 ddl => $ddl, # can be undef
30 upgrade_sql => $sql, # can be undef
33 Store a new version into the version storage
35 =method database_version
37 my $db_version = $version_storage->database_version
39 Returns the most recently installed version in the database.
41 =method delete_database_version
43 $dh->delete_database_version({ version => '1.02' })
45 Deletes given database version from the version storage
47 =method version_storage_is_installed
49 warn q(I can't version this database!)
50 unless $dh->version_storage_is_installed
52 return true iff the version storage is installed.
54 =head1 KNOWN IMPLEMENTATIONS
60 L<DBIx::Class::DeploymentHandler::VersionStorage::Standard>
64 L<DBIx::Class::DeploymentHandler::VersionStorage::Deprecated>