From: Justin Hunter Date: Tue, 11 Aug 2009 02:39:05 +0000 (-0700) Subject: add SQL::Translator constants X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d8d79091691125bb7e6d77adce05e97db090ff13;p=dbsrgits%2FSQL-Translator-2.0-ish.git add SQL::Translator constants --- diff --git a/lib/SQL/Translator/Constants.pm b/lib/SQL/Translator/Constants.pm index 77320d4..6706598 100644 --- a/lib/SQL/Translator/Constants.pm +++ b/lib/SQL/Translator/Constants.pm @@ -1,10 +1,11 @@ package SQL::Translator::Constants; use DBI qw(:sql_types); use Sub::Exporter -setup => { - exports => [ @{$DBI::EXPORT_TAGS{sql_types}} ], + exports => [ @{$DBI::EXPORT_TAGS{sql_types}}, CHECK_C, FOREIGN_KEY, FULL_TEXT, SPATIAL, NOT_NULL, NORMAL, NULL, PRIMARY_KEY, UNIQUE ], groups => { sqlt_types => [ @{$DBI::EXPORT_TAGS{sql_types}} ], sqlt_fk_actions => [ qw(SQLT_FK_CASCADE SQLT_FK_RESTRICT SQLT_FK_SET_NULL SQLT_FK_NO_ACTION SQLT_FK_SET_DEFAULT) ], + sqlt_constants => [ qw(CHECK_C FOREIGN_KEY FULL_TEXT SPATIAL NOT_NULL NORMAL NULL PRIMARY_KEY UNIQUE) ], } }; @@ -14,4 +15,14 @@ use constant SQLT_FK_SET_NULL => 2; use constant SQLT_FK_NO_ACTION => 3; use constant SQLT_FK_SET_DEFAULT => 4; +use constant CHECK_C => 'CHECK'; +use constant FOREIGN_KEY => 'FOREIGN KEY'; +use constant FULL_TEXT => 'FULLTEXT'; +use constant SPATIAL => 'SPATIAL'; +use constant NOT_NULL => 'NOT NULL'; +use constant NORMAL => 'NORMAL'; +use constant NULL => 'NULL'; +use constant PRIMARY_KEY => 'PRIMARY KEY'; +use constant UNIQUE => 'UNIQUE'; + 1;