X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=xml%2Ftemplates%2Fschema.tpl;h=9a4e2ed49e6f2e2099b31e277183c5b721a60322;hb=c201f1818e78ea762fd74ede9d7bdc31fbe0a989;hp=7faeb14782d61ef94025feefa8bfb79a12a2b397;hpb=648631cd94799e87fe2347487d465b1a7256aa57;p=civicrm-core.git diff --git a/xml/templates/schema.tpl b/xml/templates/schema.tpl index 7faeb14782..9a4e2ed49e 100644 --- a/xml/templates/schema.tpl +++ b/xml/templates/schema.tpl @@ -1,7 +1,7 @@ -- +--------------------------------------------------------------------+ --- | CiviCRM version 4.7 | +-- | CiviCRM version 5 | -- +--------------------------------------------------------------------+ --- | Copyright CiviCRM LLC (c) 2004-2017 | +-- | Copyright CiviCRM LLC (c) 2004-2019 | -- +--------------------------------------------------------------------+ -- | This file is a part of CiviCRM. | -- | | @@ -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}