<?php

use yii\db\Migration;
use yii\db\Schema;

/**
 * Class m240620_074924_create_table_product_accessory
 */
class m240620_074924_create_table_product_accessory extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->createTable('product_accessory', [
            'id' => 'pk',
            'id_product' => Schema::TYPE_INTEGER.' NOT NULl',
            'id_accessory' => Schema::TYPE_INTEGER.' NOT NULl',
            'quantity' => Schema::TYPE_INTEGER.' NOT NULL'
        ]);
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->dropTable('product_accessory');
    }
}
