M250306032007AlterQimallAddonsCloudStockAgentOrder.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace addons\CloudStock\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M250306032007AlterQimallAddonsCloudStockAgentOrder
  6. */
  7. class M250306032007AlterQimallAddonsCloudStockAgentOrder extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. try {
  15. $sql = "
  16. alter table qimall_addons_cloud_stock_agent_order add `pay_time` bigint(20) DEFAULT '0' COMMENT '支付时间';
  17. alter table qimall_addons_cloud_stock_agent_order add `payment_type` tinyint(1) DEFAULT '0' COMMENT '支付类型';";
  18. $this->execute($sql);
  19. } catch (\Exception $e) {
  20. }
  21. }
  22. /**
  23. * {@inheritdoc}
  24. */
  25. public function safeDown()
  26. {
  27. echo "M250306032007AlterQimallAddonsCloudStockAgentOrder cannot be reverted.\n";
  28. return false;
  29. }
  30. /*
  31. // Use up()/down() to run migration code without a transaction.
  32. public function up()
  33. {
  34. }
  35. public function down()
  36. {
  37. echo "M250306032007AlterQimallAddonsCloudStockAgentOrder cannot be reverted.\n";
  38. return false;
  39. }
  40. */
  41. }