Skip to content
Snippets Groups Projects
Commit 12616457 authored by lobo's avatar lobo
Browse files

CRM-12151

parent 783ffa43
Branches
No related tags found
No related merge requests found
......@@ -65,7 +65,7 @@ CREATE TABLE `{$table.name}` (
{if $index.unique} UNIQUE{/if} INDEX `{$index.name}`(
{assign var='firstIndexField' value=true}
{foreach from=$index.field item=fieldName}
{if $firstIndexField}{assign var='firstIndexField' value=false}{else}, {/if}`{$fieldName}`
{if $firstIndexField}{assign var='firstIndexField' value=false}{else}, {/if}{$fieldName}
{/foreach}
)
{/foreach} {* table.index *}
......@@ -75,7 +75,7 @@ CREATE TABLE `{$table.name}` (
{foreach from=$table.foreignKey item=foreign}
{if ! $first},{/if}
{assign var='first' value=false}
{if $mysql eq 'simple'} INDEX FKEY_{$foreign.name} ( `{$foreign.name}` ) , {/if}
{if $mysql eq 'simple'} INDEX FKEY_{$foreign.name} ( `{$foreign.name}` ) , {/if}
CONSTRAINT {$foreign.uniqName} FOREIGN KEY (`{$foreign.name}`) REFERENCES `{$foreign.table}`(`{$foreign.key}`) {if $foreign.onDelete}ON DELETE {$foreign.onDelete}{/if}
{/foreach} {* table.foreignKey *}
{/if} {* table.foreignKey *}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment