SQLite chosen for simplicity and zero-dependency deployment
WAL mode for concurrent read access
UUID primary keys for non-sequential user IDs
Acceptance Criteria
User model supports create, read, update, delete operations
Email uniqueness is enforced at the database level
Database is created automatically on first run
SQLite WAL mode is enabled for concurrent access
Unit tests pass for all CRUD operations
## Summary
Design and implement the user model and SQLite database layer for multi-tenant user management.
## User Model
User {
id: UUID (primary key)
email: string (unique, indexed)
created_at: timestamp
last_login_at: timestamp
storage_path: string
}
## Implementation Tasks
- [x] Choose SQLite driver for Go (e.g., modernc.org/sqlite or mattn/go-sqlite3)
- [x] Create database schema with migrations
- [x] Implement user CRUD operations
- [x] Add email uniqueness constraint
- [x] Implement connection pooling / WAL mode configuration
- [x] Add database initialization on first run
- [x] Write unit tests for user storage operations
## Design Decisions
- SQLite chosen for simplicity and zero-dependency deployment
- WAL mode for concurrent read access
- UUID primary keys for non-sequential user IDs
## Acceptance Criteria
- [x] User model supports create, read, update, delete operations
- [x] Email uniqueness is enforced at the database level
- [x] Database is created automatically on first run
- [x] SQLite WAL mode is enabled for concurrent access
- [x] Unit tests pass for all CRUD operations
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Design and implement the user model and SQLite database layer for multi-tenant user management.
User Model
User {
id: UUID (primary key)
email: string (unique, indexed)
created_at: timestamp
last_login_at: timestamp
storage_path: string
}
Implementation Tasks
Design Decisions
Acceptance Criteria
libretech referenced this issue2026-02-28 21:17:20 +01:00
libretech referenced this issue2026-03-01 20:32:14 +01:00