m160203_082111_jobs.php 765 Bytes
<?php

use yii\db\Migration;

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

        $this->createTable('{{%job}}', [
            'job_id' => $this->primaryKey(),
            'name' => $this->string(255)->notNull(),
            'link' => $this->string(255),
            'date_start' => $this->timestamp(),
            'date_end' => $this->timestamp(),
            'position' =>  $this->string(255),
            'user_id' =>  $this->integer(),
            'total_count' =>  $this->integer(),
            'complete_count' =>  $this->integer(),
            'current' => $this->smallInteger(),
        ], $tableOptions);

    }

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