Skip to content

Bump ChatDatabase version to avoid conflicts with V6 #6477

Merged
VelikovPetar merged 2 commits into
developfrom
feature/bump_db_version
May 28, 2026
Merged

Bump ChatDatabase version to avoid conflicts with V6 #6477
VelikovPetar merged 2 commits into
developfrom
feature/bump_db_version

Conversation

@VelikovPetar
Copy link
Copy Markdown
Contributor

@VelikovPetar VelikovPetar commented May 27, 2026

Goal

Bump the ChatDatabase version to prevent the V6 ChatDatabase version going over the V7 version. Sets it to 200, so that V6 never reaches this version.

Resolves: https://linear.app/stream/issue/AND-1198/bump-db-version-to-avoid-conflict-between-v6-and-v7

Implementation

Bumps version to 200

🎨 UI Changes

NA

Testing

  1. Install the app with old version 104
  2. Then install (upgrade) the app to one with version 200
  3. Everything should work (take into consideration that the DB will be cleared on update)

Summary by CodeRabbit

Chores

  • Database structure has been updated. Local app data will be refreshed on the next app launch.

Review Change Stack

@VelikovPetar VelikovPetar added the pr:internal Internal changes / housekeeping label May 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled, or the PR is bot-authored.
  • An issue is linked (Linear ticket or GitHub issue), or the PR is bot-authored.

🎉 Great job! This PR is ready for review.

@VelikovPetar VelikovPetar marked this pull request as ready for review May 27, 2026 16:01
@VelikovPetar VelikovPetar requested a review from a team as a code owner May 27, 2026 16:01
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 27, 2026

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: 4a937936-5eed-4645-b222-141fdbf21c65

📥 Commits

Reviewing files that changed from the base of the PR and between 7203869 and df94269.

📒 Files selected for processing (1)
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/internal/offline/repository/database/internal/ChatDatabase.kt

Walkthrough

ChatDatabase's Room database schema version is incremented from 104 to 200, affecting how Room handles database initialization, migrations, and the fallback destructive migration behavior for the stream_chat_database_$userId database.

Changes

Database Schema Version Update

Layer / File(s) Summary
ChatDatabase schema version
stream-chat-android-client/src/main/java/io/getstream/chat/android/client/internal/offline/repository/database/internal/ChatDatabase.kt
Room database version value updated from 104 to 200, which triggers Room's migration or destructive migration logic when the database is initialized on existing installations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A version bump of grand design,
From one-oh-four to two-hundred fine,
Room's migrations dance and sway,
As schemas shift and old data play—
One line of change, so much at stake! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: bumping the ChatDatabase version to avoid conflicts with V6.
Description check ✅ Passed The description includes the Goal, Implementation, and Testing sections. It references a Linear issue and provides clear testing steps, though UI Changes section is marked NA and the Contributor Checklist is incomplete.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/bump_db_version

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.

@github-actions
Copy link
Copy Markdown
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 5.83 MB 5.83 MB 0.00 MB 🟢
stream-chat-android-ui-components 11.04 MB 11.07 MB 0.04 MB 🟢
stream-chat-android-compose 12.46 MB 12.46 MB 0.00 MB 🟢

@sonarqubecloud
Copy link
Copy Markdown

@VelikovPetar VelikovPetar merged commit 339cd7e into develop May 28, 2026
17 checks passed
@VelikovPetar VelikovPetar deleted the feature/bump_db_version branch May 28, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:internal Internal changes / housekeeping

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants