Merge pull request #10870 from mattwire/CRM-21077_outbound_mail_warning
[civicrm-core.git] / xml / templates / schema.tpl
index 7faeb14782d61ef94025feefa8bfb79a12a2b397..c9b6bdcb82d10886ce7df27ac3c029d92622bdbc 100644 (file)
@@ -59,7 +59,8 @@ CREATE TABLE `{$table.name}` (
 {if ! $first},{/if}
 {assign var='first' value=false}
 
-    PRIMARY KEY ( `{$table.primaryKey.name}` )
+    {assign var='firstIndexField' value=true}
+    PRIMARY KEY ({foreach from=$table.primaryKey.field item=fieldName}{if $firstIndexField}{assign var='firstIndexField' value=false}{else},{/if}`{$fieldName}`{/foreach})
 {/if} {* table.primaryKey *}
 
 {if $table.index}