m160208_101449_team.php 975 Bytes
<?php

use yii\db\Migration;

class m160208_101449_team extends Migration
{
    public function up()
    {
        $tableOptions = null;

        $this->createTable('{{%team}}', [
            'team_id' => $this->primaryKey(),
            'user_id' =>  $this->integer()->notNull(),
            'firstname' => $this->string(255)->notNull(),
            'lastname' => $this->string(255)->notNull(),
            'middlename' => $this->string(255),
            'link' => $this->string(255),
            'position' => $this->string(255)->notNull(),
            'department_id' => $this->integer()->notNull(),
            'experience_from' => $this->integer(),
            'date_add' => $this->timestamp()->notNull(),
            'user_add_id' => $this->integer(),
            'photo' => $this->string(255),
            'country_id' =>  $this->string(255)->notNull(),
        ], $tableOptions);
    }

    public function down()
    {
        $this->dropTable('{{%team}}');
    }
}