From 8e56765908b23bf73e958733ead20b1d8b53a9ef Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 13 Dec 2007 22:44:06 +0000 Subject: [PATCH] fix bug preventing adding new columns as primary keys under Pg --- Changes | 1 + DBSchema/Column.pm | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index bf6150f..8139e74 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,7 @@ Revision history for Perl extension DBIx::DBSchema. 0.36 unreleased - Patch from ISHIGAKI@cpan.org to suppress unnecessary warnings about undefined local_options, thanks! + - fix bug preventing adding new columns as primary keys under Pg 0.35 Mon Oct 29 18:58:36 PDT 2007 - Fix minor breakage (pretty_print) resulting from Jesse's changes. diff --git a/DBSchema/Column.pm b/DBSchema/Column.pm index 46f526b..431e69c 100644 --- a/DBSchema/Column.pm +++ b/DBSchema/Column.pm @@ -5,7 +5,7 @@ use vars qw($VERSION); use Carp; use DBIx::DBSchema::_util qw(_load_driver _dbh); -$VERSION = '0.10'; +$VERSION = '0.11'; =head1 NAME @@ -367,7 +367,7 @@ sub sql_add_column { my $real_null = undef; if ( exists($hashref->{'effective_null'}) ) { $real_null = $self->null; - $self->type($hashref->{'effective_type'}); + $self->null($hashref->{'effective_null'}); } push @sql, "ALTER TABLE $table ADD COLUMN ". $self->line($dbh); -- 2.11.0