Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

31 lines
927B

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