Skip to content

Conversation

@ildyria
Copy link
Member

@ildyria ildyria commented Jan 28, 2026

Summary by CodeRabbit

  • Chores
    • Improved photo database maintenance to process items individually with better error handling so single-item issues won't abort whole cleanup.
    • Preserved cleanup of related photo data (variants, purchasable links, statistics, album entries) to keep storage consistent.

✏️ Tip: You can customize this high-level summary in your review settings.

@ildyria ildyria requested a review from a team as a code owner January 28, 2026 22:04
@ildyria ildyria changed the title Fix logic aboud de-duplication Fix logic about de-duplication Jan 28, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 28, 2026

📝 Walkthrough

Walkthrough

Refactors a Laravel migration to replace bulk photo reference updates with per-photo iteration. Each photo update runs inside its own try/catch so individual duplicate/conflict errors are ignored. Cleanup deletions for size_variants, purchasables, statistics, and photo_album remain; some per-item error-handling comments were added.

Changes

Cohort / File(s) Summary
Photo reference migration
database/migrations/2026_01_19_193315_refactor_photo_avoid_duplicates.php
Replaced bulk update statements with per-photo iteration; added try/catch around each item and inline comments for per-item error handling; retained deletions of size_variants, purchasables, statistics, and photo_album.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through rows of data bright,

One photo at a time by moonlit night,
Try and catch each stubborn duplicate,
Nibble errors gently, leave the rest straight,
A tidy cleanup hop — all set, delight!

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

@ildyria ildyria merged commit 682e287 into master Jan 28, 2026
44 checks passed
@ildyria ildyria deleted the fix-migration-de-duplicate branch January 28, 2026 23:39
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.

2 participants