20251104122614_wechat_transfer_bill_package_info.php 1.3 KB

123456789101112131415161718192021222324252627282930
  1. <?php
  2. declare(strict_types=1);
  3. use Phinx\Migration\AbstractMigration;
  4. final class WechatTransferBillPackageInfo extends AbstractMigration
  5. {
  6. /**
  7. * Change Method.
  8. *
  9. * Write your reversible migrations using this method.
  10. *
  11. * More information on writing migrations is available here:
  12. * https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method
  13. *
  14. * Remember to call "create()" or "update()" and NOT "save()" when working
  15. * with the Table class.
  16. */
  17. public function change(): void
  18. {
  19. $table = $this->table('wechatpay_transfer_bill');
  20. $table->addColumn('transfer_scene_id', 'string', ['limit' => 64, 'comment' => '转账场景ID', 'after' => 'user_name'])
  21. ->addColumn('user_recv_perception', 'string', ['limit' => 255, 'comment' => '用户收款感知', 'after' => 'transfer_scene_id'])
  22. ->addColumn('accept_time', 'timestamp', ['comment' => '受理时间', 'after' => 'user_recv_perception'])
  23. ->addColumn('transfer_scene_report_infos', 'json', ['comment' => '转账场景ID', 'after' => 'accept_time'])
  24. ->addColumn('package_info', 'json', ['comment' => '跳转领取页面的package信息', 'after' => 'transfer_scene_report_infos'])
  25. ->update();
  26. }
  27. }