Blame view

console/migrations/m160512_153443_subscribe.php 482 Bytes
4253cbec   root   first 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
  <?php
  
  use yii\db\Migration;
  
  class m160512_153443_subscribe extends Migration
  {
      public function up()
      {
          $this->createTable('{{%subscribe}}', [
  
  
              'id' => $this->primaryKey(),
              'email' => $this->string()->notNull(),
              'sale' => $this->integer()->notNull(),
              'sand' => $this->smallInteger()->notNull()->defaultValue(0),
          ]);
      }
  
      public function down()
      {
          $this->dropTable('{{%subscribe}}');
      }
  
  }