Repository navigation
Commit 8b1b0bd
Select the --where rows once per table, before any column is replaced
A --where condition on a column that the same run replaces was evaluated
again for each column, so once one column was replaced, the next columns
no longer matched it: the live run depended on the column order and made
fewer replacements than the dry run reported.
With more than one column, select the primary keys of the matching rows
before any replacement, paging by primary key, and restrict every
column's replacement and dry-run count to those keys, in chunks of 1000.
Columns that share their conditions share one key list; tables without
--where, and single columns, keep their existing queries.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UWTd5pwpi2xQfDA6mUYkkx1 parent 894ee48 commit 8b1b0bd
2 files changed
Lines changed: 251 additions & 62 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
471 | 516 | | |
472 | 517 | | |
473 | 518 | | |
| |||
0 commit comments