DBIx::Schema::UpToDate

Helps keep a database schema up to date
Download

DBIx::Schema::UpToDate Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Publisher Name:
  • Randy Stauner
  • Publisher web site:
  • http://search.cpan.org/~rwstauner/

DBIx::Schema::UpToDate Tags


DBIx::Schema::UpToDate Description

Helps keep a database schema up to date DBIx::Schema::UpToDate is a Perl module that provides a base class for keeping a database schema up to date. If you need to make changes to the schema in remote databases in an automated manner you may not be able to ensure what version of the database is installed by the time it gets the update. This module will apply updates (defined as perl subs (coderefs)) sequentially to bring the database schema up to the latest version from whatever the current version is.The aim of this module is to enable you to write incredibly simple subclasses so that all you have to do is define the updates you want to apply. This is done with subs (coderefs) so you can access the object and its database handle.It is intentionally simple and is not intended for large scale applications. It may be a good fit for small embedded databases. It can also be useful if you need to reference other parts of your application as the subs allow you to utilize the object (and anything else you can reach).SYNOPSIS package Local::Database; use parent 'DBIx::Schema::UpToDate'; sub updates { shift->{updates} ||= ; } package main; my $dbh = DBI->connect(@connection_args); Local::Database->new(dbh => $dbh); # do something with $dbh which now contains the schema you expect Requirements: · Perl


DBIx::Schema::UpToDate Related Software