Skip to content

feat(backend): add users table with GitHub sync and internal IDs#1201

Open
fhennig wants to merge 6 commits into
feat/replace-auth-astro-with-better-authfrom
feat/user-table
Open

feat(backend): add users table with GitHub sync and internal IDs#1201
fhennig wants to merge 6 commits into
feat/replace-auth-astro-with-better-authfrom
feat/user-table

Conversation

@fhennig
Copy link
Copy Markdown
Contributor

@fhennig fhennig commented May 6, 2026

resolves #1179

Summary

  • Backend: adds a users table (BIGSERIAL PK, nullable github_id) with upsert via POST /users/sync and lookup via GET /users/{id}. Migrates owned_by/user_id FK columns in collections and subscriptions from GitHub ID strings to BIGINT references to the new table.
  • E2E: updates collection test fixtures to sync a user first and pass the internal ID to collection endpoints.

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by an appropriate test.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

fhennig and others added 2 commits May 5, 2026 16:19
Adds a users_table (BIGSERIAL PK, nullable github_id) with upsert via
POST /users/sync and lookup via GET /users/{id}. Migrates owned_by and
user_id columns in collections and subscriptions from GitHub ID strings
to BIGINT foreign keys referencing the new table.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dashboards Ready Ready Preview, Comment May 8, 2026 5:42pm

Request Review

fhennig and others added 2 commits May 6, 2026 11:40
…/users/{id}

Extracts the shared now() instant helper into util/InstantProvider.kt to
avoid duplication across models. Adds PublicUser DTO (id + name only) so
the public GET /users/{id} endpoint does not expose email.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…trollerTest

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@fhennig fhennig marked this pull request as ready for review May 6, 2026 09:48
@fhennig fhennig self-assigned this May 8, 2026
@fhennig fhennig linked an issue May 8, 2026 that may be closed by this pull request
Collections now require a Long internal user ID. Tests previously passed
string GitHub IDs directly, causing 400/500 errors. Now each test suite
syncs the user via POST /users/sync first and uses the returned internal ID.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

backend: add user table

1 participant