<?php

use yii\db\Schema;
use yii\db\Migration;
use yii\base\Object;
use common\models\User;

class m150828_200317_add_default_admin_user extends Migration
{
    public function up()
    {
    	$user = new User();
    	$user->username = "admin";
    	$user->email = "admin@rocho-net.hu";
    	$user->setPassword("test");
    	$user->generateAuthKey();
    	$user->save();
    }

    public function down()
    {
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
