Commit a796bab
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 3222058 commit a796bab
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 | | |
5 | 5 | | |
6 | 6 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
149 | 164 | | |
150 | 165 | | |
151 | 166 | | |
| |||
0 commit comments