Blame view

console/migrations/m160208_101449_team.php 964 Bytes
a82865e3   Administrator   add Vitaliy's wid...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  <?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(),
02524a34   Yarik   test
16
              'middlename' => $this->string(255),
a82865e3   Administrator   add Vitaliy's wid...
17
18
              'link' => $this->string(255),
              'position' => $this->string(255)->notNull(),
816e328e   Yarik   test
19
              'department_id' => $this->integer(),
b16ed95f   Yarik   test
20
              'experience_from' => $this->integer(),
a82865e3   Administrator   add Vitaliy's wid...
21
22
23
24
25
26
27
28
29
30
31
32
              '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}}');
      }
  }