Skip to content

Fix migration failing when rerun.#4070

Merged
ildyria merged 2 commits intomasterfrom
fix-migration-de-duplicate
Feb 3, 2026
Merged

Fix migration failing when rerun.#4070
ildyria merged 2 commits intomasterfrom
fix-migration-de-duplicate

Conversation

@ildyria
Copy link
Member

@ildyria ildyria commented Feb 3, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced database migration robustness by implementing conditional column creation logic. This prevents duplicate column errors when migrations are re-run, ensuring smoother database updates.

@ildyria ildyria requested a review from a team as a code owner February 3, 2026 16:06
@coderabbitai
Copy link

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

A database migration adds a conditional guard to check if the duration column exists before creating duration and fps columns in the photos table, preventing duplicate column errors during schema modification.

Changes

Cohort / File(s) Summary
Database Migration
database/migrations/2026_01_18_212133_refactor_photo_structure.php
Wraps column creation in a guard condition to skip adding duration and fps columns if duration already exists, transitioning from unconditional to conditional schema modification.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A clever guard prevents duplicate woes,
The migration checks before it grows,
No columns twice upon this table fair,
A rabbit's wisdom, cautious care! ✨

🚥 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.

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Failure to add the new IP will result in interrupted reviews.


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

@ildyria ildyria merged commit 26995ae into master Feb 3, 2026
44 checks passed
@ildyria ildyria deleted the fix-migration-de-duplicate branch February 3, 2026 16:41
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.

1 participant