From: Justin Hunter Date: Sat, 11 Jul 2009 19:28:52 +0000 (-0700) Subject: add foreign key action constants X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=03749994bfb02e8476c505357047be99b0710981;p=dbsrgits%2FSQL-Translator-2.0-ish.git add foreign key action constants --- diff --git a/lib/SQL/Translator/Constants.pm b/lib/SQL/Translator/Constants.pm index 27041c2..77320d4 100644 --- a/lib/SQL/Translator/Constants.pm +++ b/lib/SQL/Translator/Constants.pm @@ -3,8 +3,15 @@ use DBI qw(:sql_types); use Sub::Exporter -setup => { exports => [ @{$DBI::EXPORT_TAGS{sql_types}} ], groups => { - sqlt_types => [ @{$DBI::EXPORT_TAGS{sql_types}} ] + 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) ], } }; +use constant SQLT_FK_CASCADE => 0; +use constant SQLT_FK_RESTRICT => 1; +use constant SQLT_FK_SET_NULL => 2; +use constant SQLT_FK_NO_ACTION => 3; +use constant SQLT_FK_SET_DEFAULT => 4; + 1;