Blame view

console/migrations/m160203_082111_jobs.php 795 Bytes
14a09168   Alex Savenko   init commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  <?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}}');

      }

  }