Denorms the 1st checkout date to the asset table#18511
Open
Godmartinz wants to merge 9 commits intogrokability:developfrom
Open
Denorms the 1st checkout date to the asset table#18511Godmartinz wants to merge 9 commits intogrokability:developfrom
Godmartinz wants to merge 9 commits intogrokability:developfrom
Conversation
Member
|
@uberbrady Please look at this one carefully when you get a moment. Folks with a lot of action logs could run into issues here. |
uberbrady
requested changes
Feb 11, 2026
Member
uberbrady
left a comment
There was a problem hiding this comment.
Thanks for taking a swing at this! I think it's a good start, but I'd like to see a few things change, if we can. Let's hop together on the pairing channel to see if we can get this across the finish line. Some very sophisticated query logic in here; I'm impressed :)
...rations/2026_02_04_222600_add_action_logs_item_type_item_id_action_type_created_at_index.php
Show resolved
Hide resolved
database/migrations/2026_02_04_222603_backfill_first_checkout_at_on_assets_table.php
Show resolved
Hide resolved
database/migrations/2026_02_04_222603_backfill_first_checkout_at_on_assets_table.php
Outdated
Show resolved
Hide resolved
database/migrations/2026_02_04_222603_backfill_first_checkout_at_on_assets_table.php
Outdated
Show resolved
Hide resolved
# Conflicts: # app/Http/Controllers/Api/AssetsController.php
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.
This removes the
addSelectfrom the asset index and denormalizes the field to the assets table with a DB update in a migration.another migration is created before the backfill of the
first_checkout_atdate, to index the action_log by[item_type, item_id, action_type, created_at]to make the whole matching process quicker.