Skip to content

Remove duplicate Indices on PrimaryKeys. #5820

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Sagar0-0
Copy link
Contributor

@Sagar0-0 Sagar0-0 commented Jun 9, 2025

🎯 Goal

Remove unnecessary @ColumnInfo(index = true) from a @PrimaryKey column, as Room and SQLite automatically index primary keys.

🛠 Implementation details

Removed @ColumnInfo(index = true) annotation from the primary key column in these two entity..
This cleanup helps avoid redundant annotations and keeps the entity definition minimal and accurate.

🧪 Testing

No runtime or behavioral impact expected, as primary keys are indexed by default.
Verified that Room compiles the schema correctly and no migrations are required for this change.

☑️Contributor Checklist

General

  • I have signed the Stream CLA (required)
  • Assigned a person / code owner group (required)
  • Thread with the PR link started in a respective Slack channel (#android-chat-core or #android-chat-ui) (required)
  • PR is linked to the GitHub issue it resolves

Code & documentation

  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (KDocs, docusaurus, tutorial)

☑️Reviewer Checklist

  • UI Components sample runs & works
  • Compose sample runs & works
  • UI Changes correct (before & after images)
  • Bugs validated (bugfixes)
  • New feature tested and works
  • Release notes and docs clearly describe changes
  • All code we touched has new or updated KDocs

🎉 GIF

Please provide a suitable gif that describes your work on this pull request

@Sagar0-0 Sagar0-0 requested a review from a team as a code owner June 9, 2025 14:09
@Sagar0-0 Sagar0-0 force-pushed the sagar/duplicate-index branch from 101872a to ae49e38 Compare June 9, 2025 14:11
@Sagar0-0 Sagar0-0 force-pushed the sagar/duplicate-index branch from ae49e38 to ed22872 Compare June 9, 2025 14:13
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