<?php

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

class m160301_055203_fix_sessions extends Migration
{
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
        $this->addColumn('sessions_url', 'utm', Schema::TYPE_INTEGER.'(1) NOT NULL DEFAULT 0 AFTER referer');
    }

    public function safeDown()
    {
        $this->dropColumn('sessions_url', 'utm');
    }
}
