diff -r f1c1e101e3d4eddb9386a8c9beb62cea82787191 -r 5c708d546d02dedc94265a9b4661e1889b459544 indefero/src/IDF/Migrations/28OTPKey.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/indefero/src/IDF/Migrations/28OTPKey.php Sun Aug 11 15:05:46 2013 -0500 @@ -0,0 +1,36 @@ +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]); +} \ No newline at end of file