CodeExplorer _createIndexSql example
$sql = "CREATE TABLE {" .
$name . "} (\n\t";
$sql .=
implode(",\n\t",
$sql_fields);
if (count($sql_keys) > 0
) { $sql .= ",\n\t";
} $sql .=
implode(",\n\t",
$sql_keys);
$sql .= "\n)";
$statements[] =
$sql;
if (isset($table['indexes'
]) &&
is_array($table['indexes'
])) { foreach ($table['indexes'
] as $key_name =>
$key) { $statements[] =
$this->
_createIndexSql($name,
$key_name,
$key);
} } // Add table comment.
if (!
empty($table['description'
])) { $statements[] = 'COMMENT ON TABLE {' .
$name . '} IS ' .
$this->
prepareComment($table['description'
]);
} // Add column comments.
foreach ($table['fields'
] as $field_name =>
$field) { if (!
empty($field['description'
])) {