From: Justin Hunter Date: Fri, 12 Nov 2010 18:43:11 +0000 (-0800) Subject: coerce $column for add_column X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=801e0d4f9f9a2517d5f59de58f275eebb77d5f09;p=dbsrgits%2FSQL-Translator-2.0-ish.git coerce $column for add_column --- diff --git a/lib/SQL/Translator/Object/Constraint.pm b/lib/SQL/Translator/Object/Constraint.pm index 4a76da8..b16f395 100644 --- a/lib/SQL/Translator/Object/Constraint.pm +++ b/lib/SQL/Translator/Object/Constraint.pm @@ -84,7 +84,7 @@ class SQL::Translator::Object::Constraint extends SQL::Translator::Object { has 'on_delete' => ( is => 'rw', required => 0); has 'on_update' => ( is => 'rw', required => 0); - around add_column(Column $column) { + around add_column(Column $column does coerce) { if ($self->has_type && $self->type eq 'PRIMARY KEY') { $column->is_primary_key(1); }