<?php
// удаляем поле thread из cb_mail_archive
$result = run_query("SHOW FIELDS FROM `" . $config['table_prefix'] . "mail_archive` LIKE 'thread'");
if (sql_fetch_assoc($result)) {
    run_query("ALTER TABLE `" . $config['table_prefix'] . "mail_archive` DROP `thread`");
}

// удаляем поле form_id из cb_module_sms_archive
$result = run_query("SHOW FIELDS FROM `" . $config['table_prefix'] . "module_sms_archive` LIKE 'form_id'");
if (sql_fetch_assoc($result)) {
    run_query("ALTER TABLE `" . $config['table_prefix'] . "module_sms_archive` DROP `form_id`");
}
?>