From: Justin Hunter Date: Sat, 22 Aug 2009 21:36:34 +0000 (-0700) Subject: move reference_* down to Constraint X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d63c8da018d03420986b495cb6dd5ec0d842ffc1;p=dbsrgits%2FSQL-Translator-2.0-ish.git move reference_* down to Constraint --- diff --git a/lib/SQL/Translator/Object/Constraint.pm b/lib/SQL/Translator/Object/Constraint.pm index f5e5c21..759b97f 100644 --- a/lib/SQL/Translator/Object/Constraint.pm +++ b/lib/SQL/Translator/Object/Constraint.pm @@ -49,6 +49,17 @@ class SQL::Translator::Object::Constraint { isa => Str, ); + has 'reference_table' => ( + isa => Maybe[Str], + is => 'rw', + ); + + has 'reference_columns' => ( + isa => ArrayRef | Undef, + is => 'rw', + auto_deref => 1 + ); + has 'options' => ( is => 'rw', isa => ArrayRef, diff --git a/lib/SQL/Translator/Object/ForeignKey.pm b/lib/SQL/Translator/Object/ForeignKey.pm index af1bd13..f9d2327 100644 --- a/lib/SQL/Translator/Object/ForeignKey.pm +++ b/lib/SQL/Translator/Object/ForeignKey.pm @@ -7,12 +7,6 @@ class SQL::Translator::Object::ForeignKey { default => 'FOREIGN KEY', ); - has 'reference_columns' => ( - isa => ArrayRef | Undef, - is => 'rw', - auto_deref => 1 - ); - has 'on_delete' => ( isa => Maybe[Str], is => 'rw', @@ -27,6 +21,4 @@ class SQL::Translator::Object::ForeignKey { isa => Str, is => 'rw', ); - - method reference_fields { return $self->reference_columns } }