luyadev/luya-module-admin

View on GitHub
src/migrations/m170926_144137_add_admin_user_session_id_column.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%
<?php

use yii\db\Migration;

/**
 * @author Basil Suter <basil@nadar.io>
 */
class m170926_144137_add_admin_user_session_id_column extends Migration
{
    public function safeUp()
    {
        $this->addColumn('{{%admin_user_login}}', 'session_id', $this->string()->notNull()->defaultValue(null)); // default value supports upgrading and sync from previous system.s
    }

    public function safeDown()
    {
        $this->dropColumn('{{%admin_user_login}}', 'session_id');
    }
}