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