srchub-old

srchub-old Mercurial Source Tree


Root/indefero/src/IDF/Migrations/29EnableAds.php

<?php

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

    $sql = array();

    $sql["MySQL"] = "ALTER TABLE " . $table . " ADD COLUMN `enableads` int(11) NULL AFTER `current_activity`;";

    $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 `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]);
}
Source at commit 128fa1b9447e created 10 years 6 months ago.
By "Nathan Adams ", Adding RSS icons to make it more obvious on how to subscribe to feeds issue 32

Archive Download this file

Branches

Tags

Page rendered in 2.06053s using 11 queries.