<?php
$result = run_query("SHOW COLUMNS FROM `" . $config['table_prefix'] . "bizproc` LIKE 'bp_type'");
if (!sql_fetch_assoc($result)) {
    run_query("ALTER TABLE `" . $config['table_prefix'] . "bizproc` ADD `bp_type` INT NOT NULL DEFAULT 0");
}

$result = run_query("SHOW COLUMNS FROM `" . $config['table_prefix'] . "bizproc_steps` LIKE 'g_button'");
if (!sql_fetch_assoc($result)) {
    run_query("ALTER TABLE `" . $config['table_prefix'] . "bizproc_steps` ADD `g_button` INT NOT NULL DEFAULT 0");
}

$result = run_query("SHOW COLUMNS FROM `" . $config['table_prefix'] . "bizproc_steps` LIKE 'b_button'");
if (!sql_fetch_assoc($result)) {
    run_query("ALTER TABLE `" . $config['table_prefix'] . "bizproc_steps` ADD `b_button` INT NOT NULL DEFAULT 0");
}

$result = run_query("SHOW COLUMNS FROM `" . $config['table_prefix'] . "bizproc_steps` LIKE 'g_link'");
if (!sql_fetch_assoc($result)) {
    run_query("ALTER TABLE `" . $config['table_prefix'] . "bizproc_steps` ADD `q_link` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci");
}

$result = run_query("SHOW COLUMNS FROM `" . $config['table_prefix'] . "bizproc_steps` LIKE 'b_link'");
if (!sql_fetch_assoc($result)) {
    run_query("ALTER TABLE `" . $config['table_prefix'] . "bizproc_steps` ADD `b_link` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci");
}
?>