Skip to content

Fix Drift indexes and preparation ordering#566

Merged
jjoonleo merged 2 commits into
mainfrom
feature/issue-541-drift-indexes-preparation-order
Jun 28, 2026
Merged

Fix Drift indexes and preparation ordering#566
jjoonleo merged 2 commits into
mainfrom
feature/issue-541-drift-indexes-preparation-order

Conversation

@jjoonleo

Copy link
Copy Markdown
Contributor

Summary

  • Add Drift indexes for schedule/preparation lookup fields and a schema 4 upgrade path that creates them for existing schema 3 databases.
  • Reuse the domain preparation ordering logic in schedule/user DAOs for O(n) reconstruction with broken-link and cycle safety.
  • Add Preparation/Schedule glossary terms and tests for DAO ordering, corrupted links, cycles, and index migration expectations.

Closes #541
Related: #392

Tests

  • dart run build_runner build --delete-conflicting-outputs
  • flutter analyze
  • flutter test test/core/database/database_index_test.dart test/data/daos/preparation_schedule_dao_test.dart test/data/daos/preparation_user_dao_test.dart test/data/daos/schedule_dao_test.dart
  • flutter test (704 tests passed)

Notes

  • Drift generated files were regenerated locally but remain ignored by the repository .gitignore.

@jjoonleo jjoonleo merged commit 3f1811c into main Jun 28, 2026
1 of 4 checks passed
@jjoonleo jjoonleo deleted the feature/issue-541-drift-indexes-preparation-order branch June 28, 2026 13:35
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.

[Production readiness] Add Drift indexes and linear preparation chain reconstruction

1 participant