SQLite engine and schema definition - #59
Merged
ZFordDev merged 1 commit intoJun 7, 2026
Conversation
ZFordDev
merged commit Jun 7, 2026
06426f5
into
42-logic-layer-overhaul-json-database-migration-uiagnostic-storage-architecture
1 check failed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements the SQLite engine, connection manager, and schema creation for the new database‑backed logic layer defined in Issue #42.
It introduces a lazy‑loaded SQLite connection, enforces foreign key support, and creates all required tables on first use.
This module is fully UI‑agnostic and forms the foundation for the upcoming repository API, migration system, and scheduler integration.
No wiring or integration is included in this PR.
Type of Change
Details
What this PR adds
storage/db.pyPRAGMA foreign_keys = ON)sqlite3.Rowrow factory for dict‑like accessinit_db()helper for future startup integrationDesign decisions
Side effects
Testing
A small temporary test harness (not included in this PR) was used to validate:
Related Issues
Fixes #42B
Part of #42 — Logic Layer Overhaul (JSON → SQLite)
Additional Notes (optional)