From: Justin Hunter Date: Wed, 17 Jun 2009 23:12:41 +0000 (-0700) Subject: remove some attributes from Column X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7c560496be1e999fa5bccada0be5ac6d3328a8dd;p=dbsrgits%2FSQL-Translator-2.0-ish.git remove some attributes from Column missed Maybe --- diff --git a/lib/SQL/Translator/Object/Column.pm b/lib/SQL/Translator/Object/Column.pm index 06b79b1..e6a31b4 100644 --- a/lib/SQL/Translator/Object/Column.pm +++ b/lib/SQL/Translator/Object/Column.pm @@ -1,6 +1,6 @@ package SQL::Translator::Object::Column; use Moose; -use MooseX::Types::Moose qw(Bool Int Str); +use MooseX::Types::Moose qw(Bool Int Maybe Str); use SQL::Translator::Types qw(Trigger); extends 'SQL::Translator::Object'; @@ -10,7 +10,7 @@ has 'name' => ( required => 1 ); -has 'type' => ( +has 'data_type' => ( is => 'rw', isa => Str, required => 1 @@ -18,7 +18,7 @@ has 'type' => ( has 'size' => ( is => 'rw', - isa => Int, + isa => Maybe[Int], required => 1 ); @@ -36,27 +36,6 @@ has 'is_auto_increment' => ( default => 0 ); -has 'is_primary_key' => ( - is => 'rw', - isa => Bool, - required => 1, - default => 0 -); - -has 'is_foriegn_key' => ( - is => 'rw', - isa => Bool, - required => 1, - default => 0 -); - -has 'is_unique' => ( - is => 'rw', - isa => Bool, - required => 1, - default => 0 -); - has 'default_value' => ( is => 'rw', isa => Str, diff --git a/lib/SQL/Translator/Object/Procedure.pm b/lib/SQL/Translator/Object/Procedure.pm index 945eaee..fa695cd 100644 --- a/lib/SQL/Translator/Object/Procedure.pm +++ b/lib/SQL/Translator/Object/Procedure.pm @@ -1,6 +1,6 @@ package SQL::Translator::Object::Procedure; use Moose; -use MooseX::Types::Moose qw(HashRef Int Str); +use MooseX::Types::Moose qw(HashRef Int Maybe Str); use SQL::Translator::Types qw(); use SQL::Translator::Object::Schema; extends 'SQL::Translator::Object';