<?php
if (file_exists(dirname(__FILE__) . '/SSI.php') && !defined('SMF')) {
    require_once(dirname(__FILE__) . '/SSI.php');
} elseif (!defined('SMF')) {
    die('<b>Error:</b> Cannot install - please verify that you put this file in the same place as SMF\'s index.php and SSI.php files.');
}

require_once($sourcedir . '/Subs-Admin.php');
db_extend('packages');

$columns = array(
    array(
        'name' => 'id_member',
        'type' => 'mediumint',
        'unsigned' => true,
        'not_null' => true,
    ),
    array(
        'name' => 'id_topic',
        'type' => 'mediumint',
        'unsigned' => true,
        'not_null' => true,
    ),
);

$indexes = array(
    array(
        'type' => 'primary',
        'columns' => array('id_member', 'id_topic'),
    ),
);

$smcFunc['db_create_table'](
    '{db_prefix}log_mute_topic',
    $columns,
    $indexes,
    array(),
    'update'
);

if (SMF == 'SSI') {
    echo 'Database updated!';
}

?>
