瀏覽代碼

feat(migration): add action column to profit share receiver table

- Added enum column 'action' with values 'add' and 'update'
- Set default value to 'add' for new records
- Column is not nullable and has comment '操作类型'
runphp 4 月之前
父節點
當前提交
0b15dfbdb9
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      database/migrations/20251109121623_profit_share_receiver.php

+ 1 - 0
database/migrations/20251109121623_profit_share_receiver.php

@@ -21,6 +21,7 @@ final class ProfitShareReceiver extends AbstractMigration
     {
         $this->table('profit_share_receiver', ['comment' => '分账接收方'])
             ->addColumn('user_id', 'integer', ['null' => false, 'signed' => false, 'comment' => '用户ID'])
+            ->addColumn('action', 'enum', ['null' => false, 'default' => 'add', 'values' => ['add', 'update'], 'comment' => '操作类型'])
             ->addColumn('order_no', 'string', ['null' => false, 'limit' => 22, 'comment' => '订单编号'])
             ->addColumn('org_code', 'string', ['null' => false, 'limit' => 32, 'comment' => '机构编号'])
             ->addColumn('receiver_name', 'string', ['null' => false, 'limit' => 64, 'comment' => '分账接收方名称'])