DBIx::Migration::Directories 0.05 review

Download
by rbytes.net on

DBIx::Migration::Directories is a Perl module to install/remove/upgrade/downgrade SQL schemas. SYNOPSIS use DBIx::Migration::D

License: Perl Artistic License
File size: 28K
Developer: Tyler MacDonald
0 stars award from rbytes.net

DBIx::Migration::Directories is a Perl module to install/remove/upgrade/downgrade SQL schemas.

SYNOPSIS

use DBIx::Migration::Directories;
use DBI;

my $dbh = DBI->connect('db:something:some=where', 'user', 'pass');

my $m = DBIx::Migration::Directories->new(
base => '/path/where/schemas/are',
schema => 'MyApp',
desired_version_from => 'MyApp::DataPackage',
dbh => $dbh
);

$m->migrate
or die "Installing database failed!";

DBIx::Migration::Directories provides you with a framework for managing database schemas easily. You create a directory to hold your schema, then in that directory create sub-directories containing the SQL code to install, remove, upgrade, or downgrade your schema. The schema layout is described in more detail in the "DIRECTORY LAYOUT" section below.

When asked to install, upgrade, or downgrade a database schema, DBIx::Migration::Directories will look at these directories and attempt to find the shortest path between two schema versions. It will then run the entire upgrade code in one transaction, rolling back if the upgrade fails.

Multiple database schemas can be managed within one database. DBIx::Migration::Directories currently requires two tables to exist in your database to track schema version numbers and upgrade/downgrade history. These tables are called "migration_schema_version" and "migration_schema_log", and are also manageable using DBIx::Migration::Directories.

Requirements:
Perl

DBIx::Migration::Directories 0.05 keywords