Blame view

console/migrations/m180830_105258_create_customer_table.php 1.09 KB
182feb54   Anastasia   customer
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
31
32
33
34
35
36
37
38
39
40
41
42
43
  <?php
  
  use yii\db\Migration;
  
  /**
   * Handles the creation of table `customer`.
   */
  class m180830_105258_create_customer_table extends Migration
  {
      /**
       * {@inheritdoc}
       */
      public function safeUp()
      {
          $this->createTable('customer', [
              'id' => $this->primaryKey(),
              'name' => $this->string(),
              'secondname' => $this->string(),
              'dignity' => $this->string(),
              'gender'  => $this->smallInteger(1),
              'birth'  => $this->string(),
              'citizenship' => $this->string(),
              'passport'    => $this->string(),
              'email'       => $this->string(),
              'organization' => $this->text(),
              'status'       => $this->smallInteger(1),
              'language_id'  => $this->integer(),
              'image' => $this->string(),
              'conference' => $this->boolean(),
              'geee' => $this->boolean(),
              'gere' => $this->boolean()
              
          ]);
      }
  
      /**
       * {@inheritdoc}
       */
      public function safeDown()
      {
          $this->dropTable('customer');
      }
  }