瀏覽代碼

Fixed a bug in custom tables where if skip creation was selected it still tried to create the foreign key constraints

spficklin 12 年之前
父節點
當前提交
92ad0ca514
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tripal_core/includes/custom_tables.php

+ 1 - 1
tripal_core/includes/custom_tables.php

@@ -155,7 +155,7 @@ function tripal_core_create_custom_table(&$ret, $table, $schema, $skip_creation
   }
   
   // now add any foreign key constraints
-  if(array_key_exists('foreign keys', $schema)){
+  if(!$skip_creation and array_key_exists('foreign keys', $schema)){
   	$fkeys = $schema['foreign keys'];
   	foreach ($fkeys as $fktable => $fkdetails) {
   		$relations = $fkdetails['columns'];