Explorar o código

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

spficklin %!s(int64=12) %!d(string=hai) anos
pai
achega
92ad0ca514
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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'];