From: Justin Hunter Date: Tue, 1 Dec 2009 22:46:01 +0000 (-0800) Subject: set the schema on a trigger when it is added X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7b352f4907185c63175410f5de2a5612e4d7344d;p=dbsrgits%2FSQL-Translator-2.0-ish.git set the schema on a trigger when it is added --- diff --git a/lib/SQL/Translator/Object/Schema.pm b/lib/SQL/Translator/Object/Schema.pm index 7b48900..446c553 100644 --- a/lib/SQL/Translator/Object/Schema.pm +++ b/lib/SQL/Translator/Object/Schema.pm @@ -89,7 +89,10 @@ class SQL::Translator::Object::Schema extends SQL::Translator::Object { } around add_procedure(Procedure $procedure does coerce) { $self->$orig($procedure->name, $procedure) } - around add_trigger(Trigger $trigger does coerce) { $self->$orig($trigger->name, $trigger) } + around add_trigger(Trigger $trigger does coerce) { + $trigger->schema($self); + $self->$orig($trigger->name, $trigger);; + } method is_valid { return $self->get_tables ? 1 : undef }