Skip to content

Convert user admission to PostgreSQL stored function #435

@phoenix-server

Description

@phoenix-server

Convert user admission workflow to use a PostgreSQL stored function to replace the application-layer upsert during invoice confirmation flow.

This is to complete an explicit TODO in payments-service.ts.

Acceptance Criteria

  • Create admit_user database function using atomic ON CONFLICT DO UPDATE constraints
  • Preserve ASSERT_SERIALIZED() transaction guarantees
  • Add Knex migration to provision the function
  • Add admitUser interface and DB implementation in UserRepository
  • Verify existing repository tests pass

Related

  • See TODO in payments-service.ts

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions