<?php

use yii\db\Migration;

class m160410_081133_add_new_course_table extends Migration
{
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
        $this->createTable(
            'analytics_school_course',
            [
                'id' => $this->primaryKey(),
                'name' => $this->string(255)->notNull(),
                'description' => $this->text()->defaultValue(null),
                'image' => $this->text()->defaultValue(null)
            ]
        );
    }

    public function safeDown()
    {
        $this->dropTable('analytics_school_course');
    }

}
