Location: PHPKode > projects > Sierra-php PHP Application Framework > sierra/lib/model/table.tpl
CREATE TABLE {$table->getName()} (
{assign var="started" value="0"}
{foreach from=$table->getColumns() item=column}
{if $started}, 
{/if}
  {$column->getName()} {$db->getColumnDefinition($table, $column, $dbRefIntegrity)}{assign var="started" value="1"}{/foreach}
{if $db->getTableDefinition($table, $dbRefIntegrity)}
, 
  {$db->getTableDefinition($table, $dbRefIntegrity)}
{/if}
){if $isMysql} TYPE={$mysqlTableType}{/if};

{foreach from=$table->getIndexes() item=index}
CREATE{if $index->getModifier()} {$index->getModifier()}{/if} INDEX {$index->getName()} ON {$table->getName()} ({$index->getColumns()}){if $index->getPostfix()} {$index->getPostfix()}{/if};

{/foreach}
Return current item: Sierra-php PHP Application Framework