Commit 7c776a4
committed
fix(tables): merge partial updates in updateRow to prevent column data loss
When Mothership called updateRow directly (bypassing the PATCH API route),
it passed only the changed fields — which were written as the entire row,
wiping all other columns. Move the merge logic into updateRow itself so
all callers get correct partial-update semantics, and remove the now-redundant
pre-merge from both PATCH routes.1 parent 0e7f032 commit 7c776a4
3 files changed
Lines changed: 13 additions & 50 deletions
File tree
- apps/sim
- app/api
- table/[tableId]/rows/[rowId]
- v1/tables/[tableId]/rows/[rowId]
- lib/table
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | 138 | | |
160 | 139 | | |
161 | 140 | | |
162 | 141 | | |
163 | | - | |
| 142 | + | |
164 | 143 | | |
165 | 144 | | |
166 | 145 | | |
| |||
Lines changed: 1 addition & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | 140 | | |
163 | 141 | | |
164 | 142 | | |
165 | 143 | | |
166 | | - | |
| 144 | + | |
167 | 145 | | |
168 | 146 | | |
169 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1207 | 1207 | | |
1208 | 1208 | | |
1209 | 1209 | | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
1210 | 1216 | | |
1211 | | - | |
| 1217 | + | |
1212 | 1218 | | |
1213 | 1219 | | |
1214 | 1220 | | |
1215 | 1221 | | |
1216 | 1222 | | |
1217 | | - | |
| 1223 | + | |
1218 | 1224 | | |
1219 | 1225 | | |
1220 | 1226 | | |
| |||
1224 | 1230 | | |
1225 | 1231 | | |
1226 | 1232 | | |
1227 | | - | |
| 1233 | + | |
1228 | 1234 | | |
1229 | 1235 | | |
1230 | 1236 | | |
| |||
1237 | 1243 | | |
1238 | 1244 | | |
1239 | 1245 | | |
1240 | | - | |
| 1246 | + | |
1241 | 1247 | | |
1242 | 1248 | | |
1243 | 1249 | | |
1244 | 1250 | | |
1245 | 1251 | | |
1246 | 1252 | | |
1247 | | - | |
| 1253 | + | |
1248 | 1254 | | |
1249 | 1255 | | |
1250 | 1256 | | |
| |||
0 commit comments