Blame view

console/migrations/m161228_142558_car.php 592 Bytes
eb56e5f2   Administrator   first commit
1
  <?php
4bf42036   Alexey Boroda   -Modals ready
2
3
4
5
6
7
  
  use yii\db\Migration;
  
  class m161228_142558_car extends Migration
  {
      public function up()
eb56e5f2   Administrator   first commit
8
      {
4bf42036   Alexey Boroda   -Modals ready
9
10
11
12
13
14
15
16
17
18
19
          $this->createTable('car', [
             'car_id' => $this->primaryKey(),
             'model' => $this->string(),
             'year' => $this->integer(),
             'image' => $this->string(),
             'color' => $this->string(),
             'mileage' => $this->double(),
             'build' => $this->string(),
             'option' => $this->text(),
             'price' => $this->double(),
          ]);
eb56e5f2   Administrator   first commit
20
      }
4bf42036   Alexey Boroda   -Modals ready
21
22
23
24
25
26
  
      public function down()
      {
          $this->dropTable('car');
      }
  }