예제 #1
0
function upgrade_1762()
{
    _db_add_field('fetchmail', 'domain', "VARCHAR(255) {LATIN1} DEFAULT ''", 'id');
    _db_add_field('fetchmail', 'active', '{BOOLEAN}', 'date');
    _db_add_field('fetchmail', 'created', '{DATE}', 'date');
    _db_add_field('fetchmail', 'modified', '{DATECURRENT}', 'created');
}
예제 #2
0
파일: upgrade.php 프로젝트: radixmo/xerte
function upgrade_4()
{
    if (!_db_field_exists('templatedetails', 'extra_flags')) {
        $error1 = _db_add_field('templatedetails', 'extra_flags', 'varchar(45)', '', 'access_to_whom');
        $table = table_by_key('templatedetails');
        $error2 = _upgrade_db_query("UPDATE `{$table}`  set `extra_flags`='engine=flash'");
        $table = table_by_key('originaltemplatesdetails');
        $error3 = _upgrade_db_query("UPDATE `{$table}`  set `template_framework`='site' where `template_name`='site'");
        $table = table_by_key('sitedetails');
        $error4 = _upgrade_db_query("ALTER TABLE `{$table}` CHANGE COLUMN `site_text` `site_text` TEXT NULL DEFAULT NULL");
        $error_returned = true;
        if ($error1 === false || $error2 === false || $error3 === false || $error4 === false) {
            $error_returned = false;
            // echo "creating lti tables FAILED";
        }
        return "Creating default engine flag - ok ? " . ($error_returned ? 'true' : 'false');
    } else {
        return "Default engine flag already present - ok ? true";
    }
}
예제 #3
0
function upgrade_7()
{
    global $xerte_toolkits_site;
    if (!_db_field_exists('sitedetails', 'authentication_method')) {
        $error1 = _db_add_field('sitedetails', 'authentication_method', 'char(255)', '', 'site_session_name');
        $error_returned = true;
        $res = db_query("update {$xerte_toolkits_site->database_table_prefix}sitedetails set authentication_method = 'Guest' where site_id=1");
        if ($res === false) {
            die("Error creating authentication_method field");
        }
        if ($error1 === false) {
            $error_returned = false;
            // echo "creating authentication_method field FAILED";
        }
        return "Creating authentication_method field - ok ? " . ($error_returned ? 'true' : 'false');
    } else {
        return "authentication_method field already present - ok ? true";
    }
}
예제 #4
0
파일: upgrade.php 프로젝트: port22/mail
function upgrade_1762()
{
    _db_add_field('fetchmail', 'domain', "VARCHAR(255) {LATIN1} DEFAULT ''", 'id');
    _db_add_field('fetchmail', 'active', '{BOOLEAN}', 'date');
    _db_add_field('fetchmail', 'created', '{DATE}', 'date');
    # If you followed SVN and got upgrade failures here, you might need to
    #    UPDATE config SET value=1760 WHERE name='version';
    # and run setup.php again (upgrade_1761_mysql was added later).
    _db_add_field('fetchmail', 'modified', '{DATECURRENT}', 'created');
}