refactor(db): rename profiles entity to authors - #215
Merged
fennifith merged 1 commit intoSep 3, 2026
Merged
Conversation
Standardizes on "author" instead of "profiles" across the schema, relations, routes, and worker job payloads (playfulprogramming#210). The profiles and profile_achievements tables and their profile_slug columns are renamed via ALTER TABLE, not dropped and recreated. Merges the separate /content/profiles list route into /content/authors, combining it with the existing single-author route in one file. profileImage/profileImageUrl and the author-image S3 key prefix are intentionally left unchanged, since they describe the image rather than the profiles-vs-authors naming this issue is about.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
fennifith
approved these changes
Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #210
What changed
Standardizes on "author" instead of "profiles" across the schema, relations, routes, and worker job payloads. The two names were being used interchangeably for the same entity — this makes
authorthe single name everywhere.packages/db/src/schema/profiles.ts→authors.ts):profilestable →authors,profile_achievementstable →author_achievements,profile_slugcolumn →author_slugon bothauthor_achievementsandauthor_roles.packages/db/src/relations.ts): allr.profiles/r.profileAchievementsreferences renamed to match.GET /content/profiles(list) andGET /content/authors/:slug(single) into one file,apps/api/src/routes/content/authors.ts, exposing both under/content/authors.profiles.tsis deleted;createApp.tsupdated to register a singleauthorsRoutes.sync-author,sync-post,sync-collection, andgrant-author-achievementsprocessors updated for the renamed tables/columns.GrantAuthorAchievementsInput.profileSlug→authorSlug(see Deploy note below).packages/test-fixtures/src/db-mock.tsupdated to mockauthors/authorAchievements.profiles.test.tsmerged intoauthors.test.tsalongside the list-route tests.Migration
profilesandprofile_achievementsare live production tables, so this was not a drop-and-recreate. The generated migration (packages/db/drizzle/20260902153554_hot_leech/migration.sql) is fourALTER TABLEstatements only, confirmed via drizzle-kit's interactive rename prompts (not a diff-and-guess):