فهرست منبع

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'];