authgear / authgear/authgear-server

Add `public_id` to all entity table

Open
#1,766 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2k
Forks
125
Avg merge
2d 17h
Merged PRs (30d)
32

Description

- Each entity table has `id` as its primary key. This is left unchanged.
- This issue proposes adding `public_id` to all entity table. `(app_id, public_id)` is unique.
- The migration is to copy `id` into `public_id`.
- The value of `public_id` will be used as the id field in all public facing API.
- Introduce `type InternalID string` and `type PublicID string` to let the compiler prevent us from mixing the two.

Contributor guide

Open the contributing guide

Research direction

The issue defines requirements for entity tables, a migration, public-facing APIs, and distinct InternalID and PublicID types, but names no files or tests. Start by locating the entity table definitions and current API ID handling, then confirm the migration and typed-ID scope with maintainers. Done means every entity table and public API follows the stated ID rules.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend, database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.