GenCode - Apply SQL-escaping to table comments
authorTim Otten <totten@civicrm.org>
Mon, 31 Mar 2014 22:31:27 +0000 (15:31 -0700)
committerTim Otten <totten@civicrm.org>
Mon, 31 Mar 2014 22:31:27 +0000 (15:31 -0700)
Fix regression stemming from 9e64deca

xml/templates/schema.tpl

index 68c9015c91ed147595ff7492bf28d1905af89e7d..8305c0484f277d9d9829c6eda2b66db9e44d0ddb 100644 (file)
@@ -52,7 +52,7 @@ CREATE TABLE `{$table.name}` (
 {if ! $first},{/if}
 {assign var='first' value=false}
 
-     `{$field.name}` {$field.sqlType}{if $field.collate} COLLATE {$field.collate}{/if} {if $field.required}{if $field.required == "false"}NULL{else}NOT NULL{/if}{/if} {if $field.autoincrement}AUTO_INCREMENT{/if} {if $field.default|count_characters}DEFAULT {$field.default}{/if} {if $field.comment}COMMENT '{$field.comment}'{/if}
+     `{$field.name}` {$field.sqlType}{if $field.collate} COLLATE {$field.collate}{/if} {if $field.required}{if $field.required == "false"}NULL{else}NOT NULL{/if}{/if} {if $field.autoincrement}AUTO_INCREMENT{/if} {if $field.default|count_characters}DEFAULT {$field.default}{/if} {if $field.comment}COMMENT '{ts escape=sql}{$field.comment}{/ts}'{/if}
 {/foreach} {* table.fields *}
 
 {if $table.primaryKey}