Changelog
All notable changes to this project will be documented in this file.
Breaking Changes
- Converted all primary keys from UUID to auto-incrementing integer across all modules (base model, user, todo, tenants, api_key, authorization). Existing databases must run the new Alembic migration to convert
idcolumns and preserve foreign key constraint names and indexes. - API responses now serialize entity IDs as integers instead of UUID strings.
Added
- Multitenancy support:
TenantMixinbase model providingtenant_idcolumn on all models.- New tenants module with model, entity, repository, and dependencies.
TenantMiddlewareresolving tenants via header, subdomain, or JWT claims.- Tenant dependency registered in the application and default tenant seeding on startup.
MULTITENANT_ENABLEDconfiguration flag.- Alembic migration for the multitenant schema.
- Module facade pattern replacing the user provider, exposing module capabilities through dedicated facades.
Changed
- Integer primary keys propagated through domain entities, commands, repositories, and application/presentation layers.
- Cursor pagination now parses integer IDs.
- All repositories filter by
tenant_id; repository factories and unit of work receivetenant_id. - Tenant seed relies on database-assigned integer IDs.
Fixed
- Alembic ID conversion migration preserves foreign key constraint names and indexes.
- Entity IDs serialized as integers in response schemas.
- Tenant model registered in seed runner metadata.
- Flush ordering for related records and token update semantics.