|
|
|
@ -158,11 +158,7 @@ where
|
|
|
|
|
and ns.nspname={$tableSchema} |
|
|
|
|
SQL; |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
$constraints = $this->db->createCommand($sql)->queryAll(); |
|
|
|
|
} catch (\Exception $e) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
$constraints = $this->db->createCommand($sql)->queryAll(); |
|
|
|
|
foreach ($constraints as $constraint) { |
|
|
|
|
$columns = explode(',', $constraint['columns']); |
|
|
|
|
$fcolumns = explode(',', $constraint['foreign_columns']); |
|
|
|
@ -172,7 +168,6 @@ SQL;
|
|
|
|
|
} |
|
|
|
|
$table->foreignKeys[] = $citem; |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|