Skip to content

refactor: redesign database layer#3

Open
schwaho wants to merge 4 commits intomainfrom
refactor/db_schema
Open

refactor: redesign database layer#3
schwaho wants to merge 4 commits intomainfrom
refactor/db_schema

Conversation

@schwaho
Copy link
Owner

@schwaho schwaho commented Mar 8, 2026

This change introduces a new database architecture.

Highlights:

  • normalized multi-table schema
  • centralized database connection lifecycle
  • context-based transaction handling with automatic rollback
  • separation of persistence and business logic

Legacy database code remains temporarily to avoid CI breakage during
the migration phase.

Implements: WP1
Tracking: #2

…on API

Rework the database layer to behave as a simple persistence backend
without embedded business logic.

Key changes:
- open the database connection once during application startup
- reuse the active connection across the application
- remove database path handling from the database implementation
- introduce a context-based transaction helper ensuring automatic rollback
  on failure

Legacy code remains temporarily in the repository to avoid CI
breakage during the transition.
Replace the initial single-table layout with a normalized multi-table schema.

The new schema separates the data model into multiple dedicated tables to
improve structure, extensibility and long-term maintainability.
Update the CLI initialization process to use the new database schema
and database root functions.
@schwaho schwaho force-pushed the refactor/db_schema branch from 8b565ed to ee12061 Compare March 15, 2026 12:32
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