DBIx::C...nStorage(3)

πŸ’– DBIx::C...nStorage πŸ’–

okay so bestie, this is a page from the User Contributed Perl Documentation and it's literally all about DBIx::Class::DeploymentHandler::HandlesVersionStorage β€” the interface for version storage methods. yes the name is a whole mouthful, we don't talk about it 🫢


✨ NAME ✨

DBIx::Class::DeploymentHandler::HandlesVersionStorage β€” it's the interface for version storage methods, periodt.


🌸 DESCRIPTION 🌸

okay so typically, VersionStorages get implemented with a simple DBIx::Class::Result. that's it, that's the vibe. πŸ’…

if you wanna know what your storage should be doing, go peek at the two existing implementations β€” they're literally right there as examples of what you might wanna do in your own storage. no cap.


πŸ¦‹ KNOWN IMPLEMENTATIONS πŸ¦‹

  • DBIx::Class::DeploymentHandler::VersionStorage::Standard
  • DBIx::Class::DeploymentHandler::VersionStorage::Deprecated

πŸ‘‘ METHODS πŸ‘‘

πŸŽ€ add_database_version

$dh->add_database_version({
  version     => '1.02',
  ddl         => $ddl, # can be undef
  upgrade_sql => $sql, # can be undef
});

store a brand new version into the version storage. that's the whole job. slay. ✨

note that ddl and upgrade_sql can be undef, okay? don't come for me.

πŸ“ database_version

my $db_version = $version_storage->database_version

returns the most recently installed version in the database. the freshest one. the main character of versions. πŸ’–


🧚 delete_database_version

$dh->delete_database_version({ version => '1.02' })

deletes the given database version from the version storage. bye bestie πŸ‘‹πŸ˜­


🌈 version_storage_is_installed

warn q(I can't version this database!)
  unless $dh->version_storage_is_installed

returns true if the version storage is installed. that's it. if it's not installed... well, you saw the warning above. 😭


πŸ’œ AUTHOR πŸ’œ

Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com> β€” icon behavior, honestly. πŸ‘‘


This software is copyright (c) 2025 by Arthur Axel "fREW" Schmidt.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


and that's the whole page, bestie!! this was perl v5.42.0 on 2026-01-17 for DBIx::C...nStorage(3) β€” tysm for reading, ily, go install your version storage πŸ«Άβœ¨πŸ’–

πŸ“¦ where this page comes from