Skip to content

Fix PostgreSQL driver check consistency in database indexes migration#2322

Closed
Copilot wants to merge 2 commits intoadd_missing_database_indexesfrom
copilot/sub-pr-2321
Closed

Fix PostgreSQL driver check consistency in database indexes migration#2322
Copilot wants to merge 2 commits intoadd_missing_database_indexesfrom
copilot/sub-pr-2321

Conversation

Copy link

Copilot AI commented Oct 29, 2025

Fixed inconsistent driver checks in the database indexes migration that could cause rollback failures on MySQL/SQLite databases.

Changes Made

  • Added PostgreSQL driver check to down() method: Ensures rollback only attempts to drop indexes on PostgreSQL, matching the up() method behavior
  • Clarified composite index coverage: Confirmed existing morphs('channelable') already provides optimal composite indexing for channelable_type + channelable_id queries

The migration now safely handles rollbacks across all database drivers by checking DB::getDriverName() !== 'pgsql' in both directions.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add additional database indexes for query speed Fix PostgreSQL driver check consistency in database indexes migration Oct 29, 2025
Copilot AI requested a review from glennjacobs October 29, 2025 08:55
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