Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an urgency attribute to meldingen (allowed values -1/0/1) and wires it through persistence, API I/O, and tests so callers can set it and get it back consistently.
Changes:
- Add
urgencycolumn + DB check constraint (and SQLAlchemy model constraint) with default0. - Expose
urgencyin API create/update responses and in the output schema. - Extend endpoint tests/fixtures to cover defaulting, validation, and PATCH semantics (keep existing urgency when omitted).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tests/api/v1/endpoints/test_melding.py |
Adds assertions and new cases covering default urgency, allowed values, and PATCH behavior. |
tests/api/v1/endpoints/conftest.py |
Extends the melding fixture with an optional melding_urgency param to support new tests. |
migrations/versions/7a9f5e2e9d1b_melding_urgency.py |
Adds urgency column with default + check constraint and supports downgrade. |
meldingen/schemas/output_factories.py |
Includes urgency in create/update/retrieve/list output construction. |
meldingen/schemas/output.py |
Adds urgency to the API output schema. |
meldingen/schemas/input.py |
Adds urgency to the API input schema with default and constrained values. |
meldingen/models.py |
Adds the ORM column and check constraint for urgency. |
meldingen/api/v1/endpoints/melding.py |
Uses exclude_unset=True when dumping input, enabling PATCH to avoid overwriting existing urgency when omitted. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ramonavic
previously approved these changes
Mar 10, 2026
ramonavic
approved these changes
Mar 10, 2026
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.
Implements urgency selection on meldingen (values: -1, 0, 1).