From: Justin Hunter Date: Tue, 11 Aug 2009 02:48:47 +0000 (-0700) Subject: add 'extra' and 'is_primary_key' attributes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0874db2d3706d4c473ca1ca32ea246f3eea6d845;p=dbsrgits%2FSQL-Translator-2.0-ish.git add 'extra' and 'is_primary_key' attributes --- diff --git a/lib/SQL/Translator/Object/Column.pm b/lib/SQL/Translator/Object/Column.pm index 233dc3f..26dc631 100644 --- a/lib/SQL/Translator/Object/Column.pm +++ b/lib/SQL/Translator/Object/Column.pm @@ -1,6 +1,6 @@ use MooseX::Declare; class SQL::Translator::Object::Column { - use MooseX::Types::Moose qw(Bool Int Maybe Str); + use MooseX::Types::Moose qw(Bool HashRef Int Maybe Str); use SQL::Translator::Types qw(Trigger); extends 'SQL::Translator::Object'; @@ -45,9 +45,21 @@ class SQL::Translator::Object::Column { is => 'rw', isa => Maybe[Str], ); + + has 'is_primary_key' => ( + is => 'rw', + isa => Bool, + default => 0 + ); has 'trigger' => ( is => 'rw', isa => Trigger, ); + + has 'extra' => ( + is => 'rw', + isa => HashRef, + auto_deref => 1, + ); }