X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=xml%2Ftemplates%2Fschema.tpl;h=9b01d5d402e346041e80ef0d712677fe6fa6a26e;hb=3ad5c6019923f2d95fcc3d143764cbc89ec8bb4e;hp=7faeb14782d61ef94025feefa8bfb79a12a2b397;hpb=8550efbefa508769e930a29ba23d912927b2a1bc;p=civicrm-core.git diff --git a/xml/templates/schema.tpl b/xml/templates/schema.tpl index 7faeb14782..9b01d5d402 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-2018 | -- +--------------------------------------------------------------------+ -- | 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}