Blame view

migrations/order-to-comment/m170525_095044_order_to_rating.php 601 Bytes
faff2c48   Yarik   Artbox comment cr...
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
  <?php
      
      use yii\db\Migration;
      
      class m170525_095044_order_to_rating extends Migration
      {
          public function safeUp()
          {
              $this->addForeignKey(
                  'customer_id_customer',
                  '{{%artbox_comment_rating}}',
                  'customer_id',
                  'customer',
                  'id',
                  'CASCADE',
                  'CASCADE'
              );
          }
          
          public function safeDown()
          {
              $this->dropForeignKey('customer_id_customer', '{{%artbox_comment_rating}}');
              
          }
      }