Blame view

migrations/m160726_211227_create_artbox_comment_rating.php 1.01 KB
a2cde075   Yarik   first commit
1
2
3
4
5
6
7
8
9
10
11
12
  <?php
      
      use yii\db\Migration;
      
      class m160726_211227_create_artbox_comment_rating extends Migration
      {
          
          public function up()
          {
              $this->createTable(
                  '{{%artbox_comment_rating}}',
                  [
faff2c48   Yarik   Artbox comment cr...
13
14
15
16
17
18
19
20
21
22
23
                      'id'          => $this->primaryKey(),
                      'created_at'  => $this->integer()
                                            ->notNull(),
                      'updated_at'  => $this->integer()
                                            ->notNull(),
                      'customer_id' => $this->integer(),
                      'value'       => $this->float(),
                      'model'       => $this->string()
                                            ->notNull(),
                      'model_id'    => $this->integer()
                                            ->notNull(),
a2cde075   Yarik   first commit
24
25
                  ]
              );
a2cde075   Yarik   first commit
26
27
28
29
          }
          
          public function down()
          {
a2cde075   Yarik   first commit
30
31
32
              $this->dropTable('{{%artbox_comment_rating}}');
          }
      }