Skip to content

refactor: migrate LogStore to sqlite-data#524

Merged
everpcpc merged 4 commits intomainfrom
codex/swiftdata
Feb 20, 2026
Merged

refactor: migrate LogStore to sqlite-data#524
everpcpc merged 4 commits intomainfrom
codex/swiftdata

Conversation

@everpcpc
Copy link
Copy Markdown
Owner

Summary

  • Add sqlite-data as a Swift package dependency for the app target.
  • Migrate LogStore from handwritten SQLite3 statements to SQLiteData table/query models.
  • Use a reset_logs_v2 migration that drops and recreates the logs table (no legacy log data preservation).
  • Add startup, migration, and cleanup print diagnostics to investigate unexpected log clearing behavior.

Testing

  • make format
  • make build-macos
  • make build (fails in this environment due to SwiftSyntax prebuilt module SDK mismatch in package macros)

Replace handwritten SQLite3 operations in LogStore with SQLiteData table/select models and structured query DSL.

Add nonisolated table model declarations for Swift 6 default MainActor isolation compatibility.

Switch migration to reset_logs_v2 that drops and recreates logs schema without preserving existing log rows, and add migration/cleanup debug prints to diagnose unexpected log clearing.
@everpcpc everpcpc merged commit d5c623b into main Feb 20, 2026
3 checks passed
@everpcpc everpcpc deleted the codex/swiftdata branch February 20, 2026 09:10
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