Skip to content

AWAN-100: Remove manual Room database migrations and enable destructive fallback - #46

Merged
ZeiadT merged 4 commits into
developfrom
hotfix/room-schema-crash
Aug 10, 2026
Merged

AWAN-100: Remove manual Room database migrations and enable destructive fallback#46
ZeiadT merged 4 commits into
developfrom
hotfix/room-schema-crash

Conversation

@ZeiadT

@ZeiadT ZeiadT commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

What & Why

As the app is in initial development, Room database version has been reset to 1, and manual migrations have been removed in favor of \ allbackToDestructiveMigration(dropAllTables = true). This ensures seamless database table recreation during rapid schema iterations without identity-hash mismatch crashes.

Key Changes

  • Reset Room database version to 1 in \AwanDatabase.kt.
  • Removed all \MIGRATION_*\ objects and unused Room migration imports from \AwanDatabase.kt.
  • Cleaned \DatabaseModule.kt\ by removing .addMigrations(...)\ while keeping .fallbackToDestructiveMigration(dropAllTables = true).
  • Deleted obsolete migration unit & instrumented test files.
  • Deleted obsolete schema export files (2.json through 6.json) and regenerated version 1 schema (\1.json).

Related

AWAN-100

Testing

  • :core:database:kspDebugKotlin\ (Generated version 1 schema)
  • :core:database:testDebugUnitTest\ (Passed 0 errors)
  • :app:assembleDebug\ (Passed 0 errors)

@mSaayeh

mSaayeh commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Please ignore migrations for now, as the app is still in development. We can reinstall the app and lower the number of migrations because it's constantly increasing.

@mSaayeh mSaayeh closed this Aug 10, 2026
@ZeiadT ZeiadT reopened this Aug 10, 2026
@ZeiadT ZeiadT changed the title AWAN-100: Fix Room schema migration crash AWAN-100: Remove manual Room database migrations and enable destructive fallback Aug 10, 2026

@mSaayeh mSaayeh 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.

Great work, just a stale document attached that needs to be removed

Comment thread docs/feature/inventory/2026-08-10-room-schema-v5-to-v6-crash-fix.md Outdated
@ZeiadT
ZeiadT requested a review from mSaayeh August 10, 2026 19:39

@mSaayeh mSaayeh 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.

Great Job!

@ZeiadT
ZeiadT merged commit 19faf27 into develop Aug 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants