From: Justin Hunter Date: Sat, 3 Oct 2009 04:52:39 +0000 (-0700) Subject: add a sensible default for match_type and make type not required X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d191bceb69535f783555f98035afb335862f4f81;p=dbsrgits%2FSQL-Translator-2.0-ish.git add a sensible default for match_type and make type not required --- diff --git a/lib/SQL/Translator/Object/Constraint.pm b/lib/SQL/Translator/Object/Constraint.pm index ad6fd6d..7ed4c71 100644 --- a/lib/SQL/Translator/Object/Constraint.pm +++ b/lib/SQL/Translator/Object/Constraint.pm @@ -33,7 +33,6 @@ class SQL::Translator::Object::Constraint extends SQL::Translator::Object { has 'type' => ( is => 'rw', isa => Str, - required => 1 ); has 'deferrable' => ( @@ -63,10 +62,10 @@ class SQL::Translator::Object::Constraint extends SQL::Translator::Object { has 'match_type' => ( isa => Str, - is => 'rw' + is => 'rw', + lazy => 1, + default => '' ); around add_column(Column $column) { $self->$orig($column->name, $column) } - - method reference_fields { $self->reference_columns } }