0.04001, dump_overwrite -> really_erase_my_files
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI / Pg.pm
index 08ddca8..ea50937 100644 (file)
@@ -3,20 +3,22 @@ package DBIx::Class::Schema::Loader::DBI::Pg;
 use strict;
 use warnings;
 use base 'DBIx::Class::Schema::Loader::DBI';
+use Carp::Clan qw/^DBIx::Class/;
 use Class::C3;
 
+our $VERSION = '0.04001';
+
 =head1 NAME
 
-DBIx::Class::Schema::Loader::DBI::Pg - DBIx::Class::Schema::Loader::DBI Postgres Implementation.
+DBIx::Class::Schema::Loader::DBI::Pg - DBIx::Class::Schema::Loader::DBI
+PostgreSQL Implementation.
 
 =head1 SYNOPSIS
 
   package My::Schema;
   use base qw/DBIx::Class::Schema::Loader/;
 
-  __PACKAGE__->loader_options(
-    relationships => 1,
-  );
+  __PACKAGE__->loader_options( debug => 1 );
 
   1;
 
@@ -36,6 +38,10 @@ sub _setup {
 sub _table_uniq_info {
     my ($self, $table) = @_;
 
+    # Use the default support if available
+    return $self->next::method($table)
+        if $DBD::Pg::VERSION >= 1.50;
+
     my @uniqs;
     my $dbh = $self->schema->storage->dbh;
 
@@ -79,7 +85,7 @@ sub _table_uniq_info {
         }
 
         if(!@col_names) {
-            warn "Failed to parse unique constraint $indexname on $table";
+            warn "Failed to parse UNIQUE constraint $indexname on $table";
         }
         else {
             push(@uniqs, [ $indexname => \@col_names ]);