X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBI%2FPg.pm;h=7c90dc8058efb1106a8556ae640c81fa44546c35;hb=41ef22da3417549e4b5eedd025cca17278bd1d72;hp=e599b32fad22e85d3f04fec66116db43afc17836;hpb=fd589700a1bd69eed66aa18a1dbdd9bb67098b78;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 e599b32..7c90dc8 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_06'; =head1 NAME @@ -40,8 +40,7 @@ sub _table_uniq_info { # Use the default support if available return $self->next::method($table) - if $DBI::VERSION >= 1.52 - && $DBD::Pg::VERSION >= 1.50; + if $DBD::Pg::VERSION >= 1.50; my @uniqs; my $dbh = $self->schema->storage->dbh; @@ -96,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,