From: Justin Hunter Date: Tue, 11 Aug 2009 04:48:30 +0000 (-0700) Subject: add sql_data_type attribute X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=81429cb99f3a3c9b23702e23bfb867a9743e9c6d;p=dbsrgits%2FSQL-Translator-2.0-ish.git add sql_data_type attribute --- diff --git a/lib/SQL/Translator/Object/Column.pm b/lib/SQL/Translator/Object/Column.pm index 26dc631..53a908b 100644 --- a/lib/SQL/Translator/Object/Column.pm +++ b/lib/SQL/Translator/Object/Column.pm @@ -12,6 +12,12 @@ class SQL::Translator::Object::Column { has 'data_type' => ( is => 'rw', + isa => Str, + required => 1 + ); + + has 'sql_data_type' => ( + is => 'rw', isa => Int, required => 1 ); @@ -29,13 +35,6 @@ class SQL::Translator::Object::Column { default => 1 ); - has 'is_auto_increment' => ( - is => 'rw', - isa => Bool, - required => 1, - default => 0 - ); - has 'default_value' => ( is => 'rw', isa => Maybe[Str], @@ -46,6 +45,13 @@ class SQL::Translator::Object::Column { isa => Maybe[Str], ); + has 'is_auto_increment' => ( + is => 'rw', + isa => Bool, + required => 1, + default => 0 + ); + has 'is_primary_key' => ( is => 'rw', isa => Bool,