<?php
$res = run_query("SHOW COLUMNS FROM " . $config['table_prefix'] . "questionare LIKE 'user_agreement'");
if (!sql_num_rows($res)) {
    run_query("ALTER TABLE " . $config['table_prefix'] . "questionare ADD user_agreement tinyint(1) NOT NULL");
}
$res = run_query("SHOW COLUMNS FROM " . $config['table_prefix'] . "questionare LIKE 'user_agreement_auto'");
if (!sql_num_rows($res)) {
    run_query("ALTER TABLE " . $config['table_prefix'] . "questionare ADD user_agreement_auto tinyint(1) NOT NULL");
}
$res = run_query("SHOW COLUMNS FROM " . $config['table_prefix'] . "questionare LIKE 'user_agreement_text'");
if (!sql_num_rows($res)) {
    run_query("ALTER TABLE " . $config['table_prefix'] . "questionare ADD user_agreement_text text NOT NULL");
}