Logo white

Yarik / artbox-webcomment

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • artbox-webcomment
  • migrations
  • order-to-comment
  • m170525_095044_order_to_rating.php
  • Artbox comment created
    faff2c48
    Yarik authored
    2017-05-25 18:03:35 +0300  
    Browse Code ยป
m170525_095044_order_to_rating.php 601 Bytes
Edit Raw Blame History
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}}');
            
        }
    }