srchub-old

srchub-old Mercurial Source Tree


Root/indefero/src/IDF/Migrations/28OTPKey.php

<?php

function IDF_Migrations_28OTPKey_up()
{
    $table = Pluf::factory('Pluf_User')->getSqlTable();

    $sql = array();

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

    $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('Pluf_User')->getSqlTable();

    $sql = array();

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

    $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 7751c2703d6f created 11 years 10 months ago.
By "Nathan Adams ", Making it easer to manage ads

Archive Download this file

Branches

Tags

Page rendered in 1.22713s using 11 queries.