fix(migration): 477 broadcast delivery criteria — redefine _append_criterion helper#4517
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migration
477_broadcast_delivery_criteria.sqlcalled_append_criterion()without redefining it. The helper was created and dropped inside migration407_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
CREATE OR REPLACE FUNCTION _append_criterion(...)definition at the top of 477, copied verbatim from 407.DROP FUNCTION _append_criterion(text, text, text, text);at the bottom.Test plan
🤖 Generated with Claude Code