Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Query Builder instead of Model for Update to Skip Observer #14097

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

spencerrlongg
Copy link
Collaborator

Description

On the tin, fixes problem with later migration and the observer because of using eloquent to do an update in the migration.

Partial credit to @marcusmoore

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Ran through migration testing different eol scenarios.

Test Configuration:

  • PHP version: 8.1
  • MySQL version 8.2

Copy link

what-the-diff bot commented Jan 4, 2024

PR Summary

  • Modification to the Update Method
    The update method within the up function of a specific migration file has been altered. This change impacts how the eol_explicit field in the assets table is updated. Now, rather than simply updating this field, the process takes into account conditions from other fields- namely the eol field from the model. If there's no eol field but both purchase_date and asset_eol_date fields exist, the eol_explicit still gets updated. This makes the asset update process more precise and allows for better handling of specific scenarios.

@snipe snipe merged commit 0c6611d into snipe:develop Jan 4, 2024
7 checks passed
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.

None yet

2 participants