Commit fbe4964
committed
Auto-run rowCount backfill during make dev
PR #89 added a denormalized `rowCount` field on the dataset doc plus a
one-shot `datasets:backfillRowCounts` migration for existing data.
Contributors who pull main and run `make dev` get the new schema via
the existing convex-push step, but curated seed datasets never receive
writes, so the self-heal in the row mutations never fires for them —
those cards keep showing the (capped at 5) preview-length fallback
until someone remembers to run the backfill manually.
Hooks the migration into `make dev` after convex-push. The mutation is
idempotent (re-runs report `patched: 0, alreadyCorrect: N`) so there's
no cost to running it every dev start.
Uses the same env-var-only invocation shape as seed-public-datasets to
avoid the Windows cmd issue where the `|` in the admin key gets parsed
as a shell pipe when passed via --admin-key on the command line.1 parent 0a86186 commit fbe4964
1 file changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
73 | 88 | | |
74 | 89 | | |
75 | 90 | | |
| |||
0 commit comments