Skip to content

fix(migration): 477 broadcast delivery criteria — redefine _append_criterion helper#4517

Merged
bokelley merged 1 commit into
mainfrom
fix/migration-477-append-criterion
May 14, 2026
Merged

fix(migration): 477 broadcast delivery criteria — redefine _append_criterion helper#4517
bokelley merged 1 commit into
mainfrom
fix/migration-477-append-criterion

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

Migration 477_broadcast_delivery_criteria.sql called _append_criterion() without redefining it. The helper was created and dropped inside migration 407_curriculum_3_0_criterion_ids.sql, so any later migration that wants to use it must redefine it inline (same pattern 407 uses).

Why now

477 has been broken since it merged — failing every PR's integration-test job at the "Apply migrations to test database" step:

```
✗ Failed to apply migration: 477_broadcast_delivery_criteria.sql
Migration failed: error: function _append_criterion(unknown, unknown, unknown, unknown) does not exist
```

This blocks every other PR from going green, including #4515 (OpenAPI regen) and #4513 (member tier exposure) which both surfaced the failure but were also independent work.

What changed

  • Added the CREATE OR REPLACE FUNCTION _append_criterion(...) definition at the top of 477, copied verbatim from 407.
  • Added the matching DROP FUNCTION _append_criterion(text, text, text, text); at the bottom.
  • No criterion text or IDs change; only the function-availability wrapper is added.

Test plan

  • Same structure as migration 407, which has been running cleanly in prod
  • Migration smoke test CI green
  • Server integration tests CI green (the one currently failing on main)

🤖 Generated with Claude Code

…iterion helper

Migration 477 called _append_criterion() without redefining it. The helper
was created and dropped inside migration 407, so any later migration that
wants to use it must redefine it inline (same pattern 407 uses).

477 has been failing every PR's integration-test job at
"Apply migrations to test database" with
"function _append_criterion(unknown, unknown, unknown, unknown) does not exist"
and blocking deploys.

Same create/use/drop structure as 407. No criterion text or IDs change;
only the function-availability wrapper is added.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bokelley bokelley merged commit fddd615 into main May 14, 2026
14 checks passed
@bokelley bokelley deleted the fix/migration-477-append-criterion branch May 14, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant