您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

m230112_094203_producer_add_options_billing.php 927B

123456789101112131415161718192021222324252627282930
  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. }