You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 line
746B

  1. <?php
  2. use yii\db\Migration;
  3. use yii\db\Schema;
  4. use common\logic\Producer\Producer\Producer;
  5. /**
  6. * Class m220915_083713_producer_add_options_billing
  7. */
  8. class m220915_083713_producer_add_options_billing extends Migration
  9. {
  10. /**
  11. * {@inheritdoc}
  12. */
  13. public function safeUp()
  14. {
  15. $this->addColumn('producer', 'option_billing_type', Schema::TYPE_STRING.' DEFAULT \''.Producer::BILLING_TYPE_CLASSIC.'\'');
  16. $this->addColumn('producer', 'option_billing_reduction', Schema::TYPE_BOOLEAN.' DEFAULT 0');
  17. }
  18. /**
  19. * {@inheritdoc}
  20. */
  21. public function safeDown()
  22. {
  23. $this->dropColumn('producer','option_billing_type');
  24. $this->dropColumn('producer','option_billing_reduction');
  25. }
  26. }