// Lets get the create statement directly from SQLite.
$result = $smcFunc['db_query']('', '
SELECT sql
FROM sqlite_master
WHERE type = {string:type}
AND name = {string:table_name}',
array(
'type' => 'table',
'table_name' => $tableName,
)
);
list ($schema_create) = $smcFunc['db_fetch_row']($result);
$smcFunc['db_free_result']($result);
// Now the indexes.
$result = $smcFunc['db_query']('', '
SELECT sql
FROM sqlite_master
WHERE type = {string:type}
AND tbl_name = {string:table_name}',
array(
'type' => 'index',
'table_name' => $tableName,
)
);
$indexes = array();
while ($row = $smcFunc['db_fetch_assoc']($result))
if (trim($row['sql']) != '')
$indexes[] = $row['sql'];
$smcFunc['db_free_result']($result);