Skip to content

Fix missing index on activity_log_id in activity_log_subjects table#2418

Merged
notAreYouScared merged 7 commits into
pelican-dev:mainfrom
hardcorefactions:main
Jul 2, 2026
Merged

Fix missing index on activity_log_id in activity_log_subjects table#2418
notAreYouScared merged 7 commits into
pelican-dev:mainfrom
hardcorefactions:main

Conversation

@hardcorefactions

Copy link
Copy Markdown
Contributor

Closes #2355

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 12f7e28b-0640-48bc-9ad6-918f268b6d5c

📥 Commits

Reviewing files that changed from the base of the PR and between 00a5639 and e908a08.

📒 Files selected for processing (1)
  • database/migrations/2026_06_25_175747_add_index_to_activity_log_subjects_table.php

📝 Walkthrough

Walkthrough

Adds a migration that indexes activity_log_subjects.activity_log_id and drops that index on rollback.

Changes

Activity log subject indexing

Layer / File(s) Summary
Migration schema changes
database/migrations/2026_06_25_175747_add_index_to_activity_log_subjects_table.php
Adds the migration imports, applies the activity_log_id index in up(), and drops the same index in down().
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately states the main change: adding the missing index on activity_log_id in activity_log_subjects.
Description check ✅ Passed The description is related to the change and references the linked issue.
Linked Issues check ✅ Passed The migration adds and removes the requested index on activity_log_id in activity_log_subjects, satisfying issue #2355.
Out of Scope Changes check ✅ Passed The PR only introduces the requested migration, with no evident unrelated changes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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.

@hardcorefactions

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@database/migrations/2026_06_25_175747_add_index_to_activity_log_subjects_table.php`:
- Around line 15-20: Remove the PostgreSQL-specific early return from the
migration so the index is created for all supported drivers; in the migration
class that contains the up/down logic for adding the activity log subjects
index, delete the DB::getDriverName() guard and its paired skip in the rollback
path so the schema change always applies consistently.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: bc3ef64d-4fc6-4807-a829-b8c83e674600

📥 Commits

Reviewing files that changed from the base of the PR and between 00a5639 and efa070d.

📒 Files selected for processing (1)
  • database/migrations/2026_06_25_175747_add_index_to_activity_log_subjects_table.php

@Boy132

Boy132 commented Jun 27, 2026

Copy link
Copy Markdown
Member

@coderabbitai full-review

@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

@Boy132 Re-running a full review of this PR now.

✅ Action performed

Full review finished.

@notAreYouScared notAreYouScared merged commit f9793c3 into pelican-dev:main Jul 2, 2026
16 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"activity_log_id" is not an indexed value in database.

3 participants