Commit 2e0f506
authored
fix(table): preserve workflow groups on CSV column-add and dispatch after tx commit (#4503)
Two bugs in the CSV-import path:
- addTableColumnsWithTx rebuilt the schema with only `columns`, dropping
`workflowGroups` (and any other top-level schema fields). Importing CSV
into a table that has workflow groups erased the group config. Spread
`table.schema` first so siblings survive.
- batchInsertRowsWithTx fired fireTableTrigger and scheduleRunsForRows from
inside the caller's transaction. Both read through the global db
connection, so they could run before the inserts committed and see no
rows. Extracted the dispatch into dispatchAfterBatchInsert; non-tx
wrapper fires it after `db.transaction(...)` resolves, and the CSV
import route does the same after its tx.1 parent e5a46d7 commit 2e0f506
3 files changed
Lines changed: 38 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
228 | 230 | | |
229 | 231 | | |
230 | 232 | | |
231 | | - | |
| 233 | + | |
232 | 234 | | |
233 | 235 | | |
234 | 236 | | |
235 | 237 | | |
236 | 238 | | |
237 | | - | |
| 239 | + | |
238 | 240 | | |
239 | 241 | | |
240 | 242 | | |
| |||
249 | 251 | | |
250 | 252 | | |
251 | 253 | | |
252 | | - | |
| 254 | + | |
253 | 255 | | |
254 | | - | |
| 256 | + | |
255 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
256 | 263 | | |
257 | 264 | | |
258 | 265 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
646 | | - | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
647 | 652 | | |
648 | 653 | | |
649 | 654 | | |
| |||
1067 | 1072 | | |
1068 | 1073 | | |
1069 | 1074 | | |
1070 | | - | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
1071 | 1078 | | |
1072 | 1079 | | |
1073 | 1080 | | |
| |||
1165 | 1172 | | |
1166 | 1173 | | |
1167 | 1174 | | |
1168 | | - | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
1169 | 1190 | | |
1170 | 1191 | | |
1171 | 1192 | | |
| |||
1178 | 1199 | | |
1179 | 1200 | | |
1180 | 1201 | | |
1181 | | - | |
1182 | | - | |
1183 | 1202 | | |
1184 | 1203 | | |
1185 | 1204 | | |
| |||
0 commit comments