Skip to content

Convert user admission to PostgreSQL stored function #435

Closed

Description

@chappie-daemon

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

Activity

  1. cameri commented on Apr 10, 2026

    @cameri
    Owner

    @Mohit-Davar please comment here so I can assign you the issue

  2. Mohit-Davar commented on Apr 10, 2026

    @Mohit-Davar
    Contributor

    I worked on this issue in this pr #428

  3. added a commit that references this issue on Apr 11, 2026
    0861163
  4. added a commit that references this issue on Apr 18, 2026
    3f278f6
  5. cameri commented on Apr 18, 2026

    @cameri
    Owner

    thank you @Mohit-Davar

  6. added a commit that references this issue on Oct 18, 2026
    5e62d70
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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