srchub-old

srchub-old Mercurial Source Tree


Root/indefero/src/IDF/Migrations/30SyntaxHighlightTheme.php

<?php

function IDF_Migrations_30SyntaxHighlightTheme_up()
{
    $table = Pluf::factory('IDF_Project')->getSqlTable();

    $sql = array();

    $sql["MySQL"] = "ALTER TABLE " . $table . " ADD COLUMN `syntaxtheme` VARCHAR(50) NULL AFTER `enableads`;";

    $db = Pluf::db();
    $engine = Pluf::f('db_engine');
    if (!isset($sql[$engine])) {
        throw new Exception('SQLite complex migration not supported.');
    }

    $db->execute($sql[$engine]);

}

function IDF_Migrations_28OTPKey_down()
{
    $table = Pluf::factory('IDF_Project')->getSqlTable();

    $sql = array();

    $sql["MySQL"] = "ALTER TABLE " . $table . " DROP COLUMN `syntaxtheme`;";

    $db = Pluf::db();
    $engine = Pluf::f('db_engine');
    if (!isset($sql[$engine])) {
        throw new Exception('SQLite complex migration not supported.');
    }

    $db->execute($sql[$engine]);
}
Source at commit 2ef32c152848 created 10 years 8 months ago.
By "Nathan Adams ", Fixing issue 23 - Forge watch list SQL queries too high

Archive Download this file

Branches

Tags

Page rendered in 0.85948s using 11 queries.