fix: use NULL for missing calendar event job order references#768
Open
anonymoususer72041 wants to merge 2 commits into
Open
fix: use NULL for missing calendar event job order references#768anonymoususer72041 wants to merge 2 commits into
anonymoususer72041 wants to merge 2 commits into
Conversation
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.
PR #704 changed optional activity job order references to use NULL instead of the legacy -1 sentinel. Calendar events have the same optional job order relationship, but
calendar_event.joborder_idstill used-1for missing job order references.This updates
calendar_event.joborder_idso missing job order references are represented as NULL consistently. The base schema now allows NULL and defaults to NULL and the update migration converts existing-1values as well as orphaned non-NULL job order references to NULL.The runtime write paths were updated accordingly. Calendar event creation and updates now pass PHP null when no job order is associated, and
Calendar::addEvent()/Calendar::updateEvent()write SQL NULL for that case. Deleting a job order now clears related calendar event job order references by setting them to NULL.The scope is intentionally limited to
calendar_event.joborder_id. Other legacy-1sentinels, such ascalendar_event.data_item_id,calendar_event.data_item_type, activity input sentinels, and filter parameters where-1has a different meaning, are left unchanged.