fix bug preventing adding new columns as primary keys under Pg
authorivan <ivan>
Thu, 13 Dec 2007 22:44:06 +0000 (22:44 +0000)
committerivan <ivan>
Thu, 13 Dec 2007 22:44:06 +0000 (22:44 +0000)
Changes
DBSchema/Column.pm

diff --git a/Changes b/Changes
index bf6150f..8139e74 100644 (file)
--- 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.
index 46f526b..431e69c 100644 (file)
@@ -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);