Skip to content

Conversation

jakubno
Copy link
Member

@jakubno jakubno commented Oct 13, 2025

Note

Switches team API key CRUD to sqlc, adds create/delete queries, and removes the ent TeamAPIKey schema and edges, updating handlers, seeds, and tests accordingly.

  • Backend/API:
    • Replace ent usage with sqlc in handlers/apikey.go (create/delete flows, not-found handling) and handlers/teams.go (CLI key creation).
    • Update team/apikeys.go to use db/client + sqlc CreateTeamAPIKey.
  • Database (sqlc):
    • Add CreateTeamAPIKey and DeleteTeamAPIKey queries and generated code.
  • Models/Schema (ent):
    • Remove TeamAPIKey schema and all generated code; drop related edges from Team and User entities and associated clients/mutations/queries.
  • Tooling/Deps:
    • Add packages/db module and pgx deps to go.mod files.
  • Seeding/Local Dev/Tests:
    • Switch seed scripts and local-dev seeding to sqlc client for API key insertion.
    • Adjust field names in responses (e.g., ApiKeyPrefix/Length/Mask*).

Written by Cursor Bugbot for commit 3ac0bd5. This will update automatically on new commits. Configure here.

@jakubno jakubno added the improvement Improvement for current functionality label Oct 13, 2025
Copy link

linear bot commented Oct 13, 2025

@jakubno jakubno force-pushed the refactor-team-api-keys-to-sqlc-eng-3170 branch from 3e90e65 to caf7245 Compare October 13, 2025 12:44
@jakubno jakubno force-pushed the refactor-team-api-keys-to-sqlc-eng-3170 branch from 04c52b2 to 3ac0bd5 Compare October 13, 2025 18:15
@jakubno jakubno marked this pull request as ready for review October 13, 2025 18:31
@jakubno jakubno merged commit 96d81c4 into main Oct 15, 2025
28 checks passed
@jakubno jakubno deleted the refactor-team-api-keys-to-sqlc-eng-3170 branch October 15, 2025 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement for current functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants