X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBI%2FPg.pm;h=ffa2be16e5bc0bfaf52aabe77d14ae00dd040523;hb=b327622ba07a243c4b5e10b0b7dbd17c20d75b34;hp=5f4ae7cb205920080913aa7a9cc0ef5f3403dd65;hpb=59cfa251ef35274d0632837629a2c15919d19dff;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm b/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm index 5f4ae7c..ffa2be1 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm @@ -6,7 +6,7 @@ use base 'DBIx::Class::Schema::Loader::DBI'; use Carp::Clan qw/^DBIx::Class/; use Class::C3; -our $VERSION = '0.03999_01'; +our $VERSION = '0.04999_05'; =head1 NAME @@ -38,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; @@ -91,6 +95,17 @@ sub _table_uniq_info { return \@uniqs; } +sub _extra_column_info { + my ($self, $info) = @_; + my %extra_info; + + if ($info->{COLUMN_DEF} && $info->{COLUMN_DEF} =~ /\bnextval\(/i) { + $extra_info{is_auto_increment} = 1; + } + + return \%extra_info; +} + =head1 SEE ALSO L, L,