1 package DBIx::Class::DeploymentHandler::HandlesVersionStorage;
4 # ABSTRACT: Interface for version storage methods
6 requires 'add_database_version';
7 requires 'database_version';
8 requires 'delete_database_version';
9 requires 'version_storage_is_installed';
13 # vim: ts=2 sw=2 expandtab
19 Typically VersionStorages will be implemented with a simple
20 DBIx::Class::Result. Take a look at the
21 L<two existing implementations|/KNOWN IMPLEMENTATIONS> for examples of what you
22 might want to do in your own storage.
24 =method add_database_version
26 $dh->add_database_version({
28 ddl => $ddl, # can be undef
29 upgrade_sql => $sql, # can be undef
32 Store a new version into the version storage
34 =method database_version
36 my $db_version = $version_storage->database_version
38 Returns the most recently installed version in the database.
40 =method delete_database_version
42 $dh->delete_database_version({ version => '1.02' })
44 Deletes given database version from the version storage
46 =method version_storage_is_installed
48 warn q(I can't version this database!)
49 unless $dh->version_storage_is_installed
51 return true iff the version storage is installed.
53 =head1 KNOWN IMPLEMENTATIONS
59 L<DBIx::Class::DeploymentHandler::VersionStorage::Standard>
63 L<DBIx::Class::DeploymentHandler::VersionStorage::Deprecated>