Logo white

Anastasia / artbox-stock

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • artbox-stock
  • migrations
  • m170901_100719_shop_add_column.php
  • -Product redirect and filter redirect ready
    0d42f388
    Alexey Boroda authored
    2017-09-18 12:13:36 +0300  
    Browse Code ยป
m170901_100719_shop_add_column.php 554 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
<?php

use yii\db\Migration;

class m170901_100719_shop_add_column extends Migration
{
    public function safeUp()
    {
        $this->addColumn('shop', 'image_id', $this->integer());
        $this->addForeignKey('shop_image',
                            'shop',
                            'image_id',
                            'ImageManager',
                            'id'
            );
    }

    public function safeDown()
    {
        $this->dropColumn('shop', 'image_id');
        $this->dropForeignKey('shop_image', 'shop');
    }
    
}