<?php

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

/**
 * Class m230912_070221_add_column_order_ignore_when_invoicing
 */
class m230912_070221_add_column_order_ignore_when_invoicing extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addColumn('order', 'ignore_when_invoicing', Schema::TYPE_BOOLEAN);
        $this->renameColumn('delivery_note', 'ignore_when_billing', 'ignore_when_invoicing');
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->dropColumn('order', 'ignore_when_invoicing');
        $this->renameColumn('delivery_note', 'ignore_when_invoicing', 'ignore_when_billing');
    }
}
