M250213034650AddRefundSourceColumnToYunfastPayRefundOrderTable.php 611 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace addons\YunfastPay\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Handles adding columns to table `{{%yunfast_pay_refund_order}}`.
  6. */
  7. class M250213034650AddRefundSourceColumnToYunfastPayRefundOrderTable extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $sql = <<<SQL
  15. ALTER TABLE `qimall_addons_yunfast_pay_refund_order`
  16. ADD COLUMN `refund_source` varchar(50) NOT NULL DEFAULT 'order' COMMENT '退款订单来源';
  17. SQL;
  18. $this->execute($sql);
  19. }
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public function safeDown()
  24. {
  25. }
  26. }