From: Justin Hunter Date: Wed, 9 Dec 2009 18:54:13 +0000 (-0800) Subject: use the coercion instead of creating the object (change back to add_column once aroun... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eea42e0a6adf9ae462233079f17b50219227cdb4;p=dbsrgits%2FSQL-Translator-2.0-ish.git use the coercion instead of creating the object (change back to add_column once around & coerce work properly) --- diff --git a/lib/SQL/Translator/Object/Table.pm b/lib/SQL/Translator/Object/Table.pm index 64cf5df..ed27e27 100644 --- a/lib/SQL/Translator/Object/Table.pm +++ b/lib/SQL/Translator/Object/Table.pm @@ -141,7 +141,7 @@ class SQL::Translator::Object::Table extends SQL::Translator::Object is dirty { $primary_key = SQL::Translator::Object::Constraint->new({ type => 'PRIMARY KEY' }); $self->add_constraint($primary_key); } - $primary_key->add_column(SQL::Translator::Object::Column->new({ name => $column })) unless $primary_key->exists_column($column); + $primary_key->add_field({ name => $column }) unless $primary_key->exists_column($column); ## FIX ME, change back to add_column once around add_column(coerce .. ) works return $primary_key; }