Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

SQL::Admin

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 examples
Octocat-spinner-32 lib
Octocat-spinner-32 t
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Build.PL
Octocat-spinner-32 Changes
Octocat-spinner-32 MANIFEST
Octocat-spinner-32 MANIFEST.SKIP
Octocat-spinner-32 README
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
Something went wrong with that request. Please try again.