---
# System prepended metadata

title: 2023-01-09 正式站DB更新內容

---

# 2023-01-09 正式站DB更新內容

### 新增表
無
### 新增欄位
```sql!
ALTER TABLE public.t_wallet ADD last_platform varchar(10) NULL;
ALTER TABLE public.t_joker_bet_record ADD transactionocode varchar NULL;
ALTER TABLE public.t_joker_bet_record ADD roundid varchar NULL;
```

### 資料更新
新增 t_game_platform_user 資料

SABA
```sql!
INSERT INTO public.t_game_platform_user
(club_id, agent_id, game_platform, game_user_id, game_token)
VALUES('t_platform_user.club_id', NULL, 'SABA', 't_platform_user.saba_id', NULL);
```
RCG
```sql!
INSERT INTO public.t_game_platform_user
(club_id, agent_id, game_platform, game_user_id, game_token)
VALUES('t_platform_user.club_id', 't_rcg_token.web_id', 'RCG', 't_platform_user.rcg_id', NULL);
```

RSG
```sql!
INSERT INTO public.t_game_platform_user
(club_id, agent_id, game_platform, game_user_id, game_token)
VALUES('t_platform_user.club_id', 't_rsg_token.web_id', 'RSG', 't_platform_user.rsg_id', NULL);
```
RLG
```sql!
INSERT INTO public.t_game_platform_user
(club_id, agent_id, game_platform, game_user_id, game_token)
VALUES('t_platform_user.club_id', 't_rlg_token.web_id', 'RLG', 't_platform_user.rlg_id', NULL);
```
PG
```sql!
INSERT INTO public.t_game_platform_user
(club_id, agent_id, game_platform, game_user_id, game_token)
VALUES('t_platform_user.club_id', NULL, 'PG', 't_platform_user.pg_id', NULL);
```
JDB
```sql!
INSERT INTO public.t_game_platform_user
(club_id, agent_id, game_platform, game_user_id, game_token)
VALUES('t_platform_user.club_id', NULL, 'JDB', 't_platform_user.jdb_id', NULL);
```
DS
```sql!
INSERT INTO public.t_game_platform_user
(club_id, agent_id, game_platform, game_user_id, game_token)
VALUES('t_platform_user.club_id', NULL, 'DS', 't_platform_user.ds_id', NULL);
```
AE
```sql!
INSERT INTO public.t_game_platform_user
(club_id, agent_id, game_platform, game_user_id, game_token)
VALUES('t_platform_user.club_id', NULL, 'AE', 't_platform_user.ae_id', NULL);
```

### 建立partition
建立 t_jdb_game_report  partition
```sql!
PARTITION BY RANGE (financialdate);
```