<?php

use yii\db\Schema;
use yii\db\Migration;

class m160218_175646_add_test_in_school extends Migration
{
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
        $this->addColumn('courses', 'test_id', Schema::TYPE_INTEGER . "(11) DEFAULT NULL AFTER `id`");
        $this->addColumn('lessons', 'test_id', Schema::TYPE_INTEGER . "(11) DEFAULT NULL AFTER `id`");
    }

    public function safeDown()
    {
        $this->dropColumn('courses', 'test_id');
        $this->dropColumn('lessons', 'test_id');
    }
}
