diff Lib/IMPL/SQL/Schema/Traits.pm @ 283:2f06250bab5f

*IMPL::SQL::MySQL fixed issues with foreign keys and drop table
author sergey
date Tue, 12 Feb 2013 18:43:32 +0400
parents 47db27ed5b43
children
line wrap: on
line diff
--- a/Lib/IMPL/SQL/Schema/Traits.pm	Tue Feb 12 01:24:36 2013 +0400
+++ b/Lib/IMPL/SQL/Schema/Traits.pm	Tue Feb 12 18:43:32 2013 +0400
@@ -540,7 +540,8 @@
 sub CanApply {
     my ($this,$schema) = @_;
     
-    my $table = $schema->GetTable($this->tableName);
+    my $table = $schema->GetTable($this->tableName)
+        or return 0;
     
     my $constraint = $table->GetConstraint($this->constraintName)
         or return 0;