<?php

use yii\db\Migration;
use yii\db\Schema;
use common\logic\Producer\Producer\Model\Producer;

/**
 * Class m220915_072309_producer_add_option_billing_frequency
 */
class m220915_072309_producer_add_option_billing_frequency extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addColumn('producer', 'option_billing_frequency', Schema::TYPE_STRING.' DEFAULT \''.Producer::BILLING_FREQUENCY_MONTHLY.'\'');
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->dropColumn('producer','option_billing_frequency');
    }
}
