authgear / authgear/authgear-server
Add `public_id` to all entity table
- 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
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