<?php

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

class m160207_204809_create_eauth_table extends Migration
{
    public function up()
    {
        $this->createTable('users_eauth', [
            'id' => Schema::TYPE_PK,
            'user_id' => Schema::TYPE_INTEGER . '(11) NOT NULL',
            'google_id' => Schema::TYPE_STRING . '(100) NOT NULL',
            'vk_id' => Schema::TYPE_STRING . '(100) NOT NULL',
            'twitter_id' => Schema::TYPE_STRING . '(100) NOT NULL',
            'facebook_id' => Schema::TYPE_STRING . '(100) NOT NULL',
        ]);
    }

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