Skip to content

DM-54282: Add Organization API and database#132

Merged
jonathansick merged 3 commits intomainfrom
tickets/DM-54282
Mar 11, 2026
Merged

DM-54282: Add Organization API and database#132
jonathansick merged 3 commits intomainfrom
tickets/DM-54282

Conversation

@jonathansick
Copy link
Copy Markdown
Member

Summary

  • Set up PostgreSQL database integration with Alembic migrations
  • Add organization domain model, SQLAlchemy schema, and admin REST endpoints (create, list, get, update, delete)
  • Add request context dependency, factory pattern, and service layer following the handler-owns-transaction convention
  • Add client package with organization models
  • Add testcontainers-based test infrastructure and handler tests

Related PRs

Rebases on tickets/DM-54209.

Set up PostgreSQL database integration with Alembic migrations,
organization domain model, SQLAlchemy schema, and admin REST
endpoints (create, list, get, update, delete). Add request context
dependency, factory pattern, and service layer following the
handler-owns-transaction convention. Use safir's ClientRequestError
for centralized error responses. Include CLI entry point, Dockerfile
updates for Alembic and startup script, testcontainers-based test
infrastructure, and coding conventions in CLAUDE.md.
Use %(here)s/alembic in alembic.ini so the script location resolves
relative to the config file, not the working directory. Add WORKDIR /app
in the Dockerfile runtime stage for a sensible default cwd.
Replace the UUID primary key on the organizations table with an
auto-incrementing integer. The id field is now treated as an internal
implementation detail: it remains in the domain model and ORM layer
but is removed from all public-facing API response models (client
and handler models). Includes an Alembic migration to drop and
recreate the column.
@jonathansick jonathansick merged commit c80ffdb into main Mar 11, 2026
15 checks passed
@jonathansick jonathansick deleted the tickets/DM-54282 branch March 11, 2026 18:44
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