SQL::Admin
Perl
Latest commit 3c5a36c Jun 22, 2012 @happy-barney Merge pull request #4 from jozef/master
#! && --help
Permalink
Failed to load latest commit information.
bin usage pod with examples Jun 7, 2012
examples/001
lib/SQL
t Putting done_testing() in an END block defeats its protections. done_… Sep 23, 2011
.gitignore Initial addition Aug 11, 2011
Build.PL
Changes Initial addition Aug 11, 2011
MANIFEST Initial addition Aug 11, 2011
MANIFEST.SKIP Initial addition Aug 11, 2011
README Initial addition Aug 11, 2011

README

NAME
    SQL::Admin - Maintain database schemas

SYNOPSIS
       use SQL::Admin;

       # Merge multiple SQL files
       my $catalog = SQL::Admin
          ->get_catalog
          ->load ('DB2', { file => [ 'create-schema.sql', 'update-001.sql' ] })
          ->save ('Pg', { file  => [ 'output.sql' ] });

       # ... deploy catalog
       $catalog->save ('Pg::DBI', { dbdsn  => ... });

       # Sync SQL files and db
       my $src = SQL::Admin->get_catalog;
          ->load ('Pg::DBI', { dbdsn => ... });

       my $dst = SQL::Admin->get_catalog;
          ->load ('Pg', { file => [ 'create-schema.sql' ] });

       my $diff = SQL::Admin->compare ($src, $dst);

       if ($diff->is_difference) {
           $diff->save ('Pg');
           $diff->save ('Pg::DBI', { dbdsn => ... });
       }

DESCRIPTION