Skip to content

[Fix] name nullable true로 변경#68

Merged
shinae1023 merged 1 commit into
mainfrom
feat/#27-actual-apply-count
May 22, 2026
Merged

[Fix] name nullable true로 변경#68
shinae1023 merged 1 commit into
mainfrom
feat/#27-actual-apply-count

Conversation

@shinae1023
Copy link
Copy Markdown
Member

@shinae1023 shinae1023 commented May 22, 2026

✨ 어떤 이유로 PR를 하셨나요?

  • feature 병합
  • 버그 수정(아래에 issue #를 남겨주세요)
  • 코드 개선
  • 코드 수정
  • 배포
  • 기타(아래에 자세한 내용 기입해주세요)

📋 세부 내용 - 왜 해당 PR이 필요한지 작업 내용을 자세하게 설명해주세요

📸 작업 화면 스크린샷

⚠️ PR하기 전에 확인해주세요

  • 로컬테스트를 진행하셨나요?
  • 머지할 브랜치를 확인하셨나요?
  • 관련 label을 선택하셨나요?

🚨 관련 이슈 번호 [ ]

Summary by CodeRabbit

  • Chores
    • Updated user data handling to allow optional name fields, enabling greater flexibility in user profile management.

Review Change Stack

@shinae1023 shinae1023 self-assigned this May 22, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

📝 Walkthrough

Walkthrough

A single JPA entity field constraint in the User entity is updated. The @Column annotation on line 33 of User.java changes from non-nullable to nullable, allowing the database column to accept null values without requiring any changes to constructors, builders, or other entity logic.

Changes

User Entity Nullability Update

Layer / File(s) Summary
User entity field nullability constraint
src/main/java/com/jobdri/jobdri_api/domain/user/entity/User.java
The @Column annotation on the field at line 33 is updated from nullable = false to nullable = true, permitting null values in the database column.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A column once strict, now gentle and free,
Nullable now—what a change it shall be!
One line, one constraint, a shift in the flow,
The User entity begins now to grow! 🌱

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is completely empty with only the template structure remaining. All required sections (reason, detailed content, screenshots, pre-merge checks, issue number) are unfilled. Fill in the PR description template by selecting the reason for the change, providing detailed explanation of why the name field should be nullable, and completing all pre-merge checklist items.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: making the User entity's name field nullable. This directly matches the code modification shown in the summary.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#27-actual-apply-count

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/main/java/com/jobdri/jobdri_api/domain/user/entity/User.java (1)

33-34: 🏗️ Heavy lift

Reassess null-safety risk for User.name
User.name is nullable (@Column(nullable = true)), but the codebase paths that reference the User entity do not appear to read it via User#getName() / user.getName(). The only getName() usages found in those files were for other entities (e.g., company.getName()), so the claimed direct NPE risk isn’t evidenced.
If name must be present for business logic, enforce it with validation (e.g., @NotBlank) and/or make the column non-null.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/main/java/com/jobdri/jobdri_api/domain/user/entity/User.java` around
lines 33 - 34, The User.name field is currently nullable via `@Column`(nullable =
true) which may allow unexpected nulls; decide whether name is required by
business logic and either make the column non-nullable (remove nullable=true) or
add bean validation such as `@NotBlank` on the field and enforce validation where
User instances are created/updated (references: User.name and User#getName()).
Update persistence mapping and input/DTO validation paths accordingly so callers
cannot persist or accept a null/blank name.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main/java/com/jobdri/jobdri_api/domain/user/entity/User.java`:
- Around line 33-34: User.name was changed to nullable via `@Column`(nullable =
true) but no explicit schema migration exists; add a Flyway/Liquibase migration
that alters the users.name column to allow NULL (or add a new migration SQL in
src/main/resources/db/migration) OR ensure production uses Hibernate DDL-auto to
apply this change by documenting/enforcing application-prod.yaml's JPA_DDL_AUTO
value; also audit call sites of User.getName() and any DTOs/serializers that
expose name and update them to accept/serialize null (and update API
contract/docs) to avoid NPEs or contract mismatches.

---

Nitpick comments:
In `@src/main/java/com/jobdri/jobdri_api/domain/user/entity/User.java`:
- Around line 33-34: The User.name field is currently nullable via
`@Column`(nullable = true) which may allow unexpected nulls; decide whether name
is required by business logic and either make the column non-nullable (remove
nullable=true) or add bean validation such as `@NotBlank` on the field and enforce
validation where User instances are created/updated (references: User.name and
User#getName()). Update persistence mapping and input/DTO validation paths
accordingly so callers cannot persist or accept a null/blank name.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d1754c0a-f600-443b-80d2-2c8449dee6f7

📥 Commits

Reviewing files that changed from the base of the PR and between 4efd3b0 and a2242dd.

📒 Files selected for processing (1)
  • src/main/java/com/jobdri/jobdri_api/domain/user/entity/User.java

Comment on lines +33 to 34
@Column(nullable = true)
private String name;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Search for database migration files that modify the users.name column

# Search for migration files mentioning 'name' column changes in users table
rg -i "alter.*users.*name|name.*null" --glob '**/db/migration/**' --glob '**/resources/db/**' -C3

Repository: JobDri-Developer/BackEnd

Length of output: 217


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Locate migration directories/files =="
# list candidate migration roots
fd -t d -d 4 'db' . | head -n 50
fd -t f -d 6 'V*.sql' . | head -n 50
fd -t f -d 6 '*flyway*' . | head -n 50
fd -t f -d 6 '*liquibase*' . | head -n 50
fd -t f -d 6 '*.sql' '*/migration/*' . | head -n 50 || true

echo
echo "== Find Flyway/Liquibase config =="
rg -n --hidden --no-ignore -S "flyway|liquibase" -g'*.yml' -g'*.yaml' -g'*.properties' . || true

echo
echo "== Search for migrations mentioning users.name or nullable change =="
# broader search across SQL and migration-related resources
rg -n --hidden -S "(users|user[s]?)[^\\n]{0,50}\\.name|name[^\\n]{0,50}(null|nullable)|ALTER TABLE[^\\n]{0,200}name" \
  -g'*.sql' -g'*.yml' -g'*.yaml' -g'*.properties' \
  -g'*migration*' \
  . || true

echo
echo "== Inspect User entity annotation =="
sed -n '1,140p' src/main/java/com/jobdri/jobdri_api/domain/user/entity/User.java | nl -ba | sed -n '25,110p'

Repository: JobDri-Developer/BackEnd

Length of output: 447


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "== Search for downstream usage of user.name / getName / name field =="
rg -n --hidden -S "\bgetName\s*\(|\bname\s*[:=]" src/main/java/com/jobdri/jobdri_api/domain src/main/java/com/jobdri/jobdri_api  || true

echo
echo "== Search for null checks on name =="
rg -n --hidden -S "name\s*!=\s*null|Objects\.nonNull\s*\(\s*.*name|if\s*\(\s*.*name\s*!=\s*null" src/main/java/com/jobdri/jobdri_api || true

echo
echo "== Search for potential NPE: name.toString / concat without null check =="
rg -n --hidden -S "\.name\.|name\.toString|name\s*\+\s*|String\.valueOf\s*\(\s*.*name\s*\)" src/main/java/com/jobdri/jobdri_api || true

Repository: JobDri-Developer/BackEnd

Length of output: 20571


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Locate migration directories/files =="
# list candidate migration roots
fd -t d -d 6 -S 'migration' . | head -n 50 || true
fd -t f -d 8 -S 'V*.sql' . | head -n 50 || true
fd -t f -d 8 -S '*flyway*' . | head -n 50 || true
fd -t f -d 8 -S '*liquibase*' . | head -n 50 || true
fd -t f -d 10 'db/migration' . | head -n 50 || true

echo
echo "== Find Flyway/Liquibase config =="
rg -n --hidden --no-ignore -S "flyway|liquibase" -g'*.yml' -g'*.yaml' -g'*.properties' . || true

echo
echo "== Search for migrations mentioning users.name or nullable change =="
rg -n --hidden -S "(users|user[s]?)[^\n]{0,80}\.name|name[^\n]{0,80}(null|nullable)|ALTER TABLE[^\n]{0,200}name|MODIFY COLUMN[^\n]{0,200}name" \
  -g'*.sql' -g'*.yml' -g'*.yaml' -g'*.properties' \
  -g'*migration*' \
  . || true

echo
echo "== Inspect User entity annotation around the changed lines =="
nl -ba src/main/java/com/jobdri/jobdri_api/domain/user/entity/User.java | sed -n '20,110p'

echo
echo "== Scan downstream usage of User.name (getName/name field) =="
rg -n --hidden -S "\bgetName\s*\(|\bname\b" src/main/java/com/jobdri/jobdri_api/domain src/main/java/com/jobdri/jobdri_api || true

echo
echo "== Look for explicit null checks for name =="
rg -n --hidden -S "name\s*!=\s*null|Objects\.nonNull\s*\(\s*.*name|if\s*\(\s*.*name\s*!=\s*null" src/main/java/com/jobdri/jobdri_api || true

echo
echo "== Look for likely NPE patterns using name =="
rg -n --hidden -S "\.name\.|name\.toString|name\s*\+\s*|String\.valueOf\s*\(\s*.*name\s*\)" src/main/java/com/jobdri/jobdri_api || true

Repository: JobDri-Developer/BackEnd

Length of output: 936


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Inspect User.java name field annotations (around line 33-40) =="
sed -n '1,120p' src/main/java/com/jobdri/jobdri_api/domain/user/entity/User.java | cat -n | sed -n '20,60p'

echo
echo "== Find where schema.sql is used/loaded =="
rg -n --hidden -S "schema\.sql|spring\.sql\.init|ddl-auto|create|update" -g'*.yml' -g'*.yaml' -g'*.properties' . || true

echo
echo "== Search for JPA migration tools config (flyway/liquibase) =="
rg -n --hidden -S "flyway|liquibase" -g'*.yml' -g'*.yaml' -g'*.properties' . || true

echo
echo "== Inspect users.name definition in schema.sql =="
ls -la src/main/resources/schema.sql 2>/dev/null || true
rg -n --hidden -S "(create table users|alter table users|users\\b.*name|name\\b.*users|MODIFY COLUMN.*name|CHANGE COLUMN.*name)" src/main/resources/schema.sql || true

echo
echo "== Show CREATE TABLE users (and nearby lines) from schema.sql =="
rg -n --hidden -S "create table users|users\\b" src/main/resources/schema.sql -n -S -m 20 -g'*.sql' || true
rg -n --hidden -S "create table users" -C 30 src/main/resources/schema.sql || true

echo
echo "== Search repo for any DDL touching users.name anywhere (non-migration paths too) =="
rg -n --hidden -S "(alter table users|create table users|users\\b.*name|name\\b.*users)(.{0,120})\\b(null|nullable)\\b" \
  --glob'*.sql' --glob'*.properties' --glob'*.yml' --glob'*.yaml' . || true

echo
echo "== Search specifically for User.getName() usage =="
rg -n --hidden -S "User\\s*\\)|getName\\s*\\(\\s*\\)" src/main/java/com/jobdri/jobdri_api || true

Repository: JobDri-Developer/BackEnd

Length of output: 3888


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Inspect schema.sql: users table definition =="
# show around CREATE TABLE users
rg -n --hidden -S "create table users" -n src/main/resources/schema.sql || true
# print lines around it (best-effort)
awk 'NR>=1{if($0~"create table users"){start=NR-20; if(start<1) start=1; end=NR+80} } NR>=start && NR<=end{print NR ":" $0}' src/main/resources/schema.sql || true
# if awk above didn't trigger, just show any lines mentioning "users" and "name"
echo
rg -n --hidden -S "users|\\bname\\b" src/main/resources/schema.sql | head -n 200

echo
echo "== Inspect application yaml for spring.sql.init.* (schema.sql usage) =="
rg -n --hidden -S "spring\\.sql\\.init|schema\\.sql" -g'*.yml' -g'*.yaml' src/main/resources

echo
echo "== Inspect User entity factories (signup/createSocialUser) =="
sed -n '1,220p' src/main/java/com/jobdri/jobdri_api/domain/user/entity/User.java | nl -ba | sed -n '1,140p'

echo
echo "== Inspect any usage of User.name specifically =="
# try to find "user.getName()" pattern; also look for "User" variable types near getName usage
rg -n --hidden -S "user\\.getName\\s*\\(" src/main/java/com/jobdri/jobdri_api || true
rg -n --hidden -S "getName\\s*\\(\\s*\\)" src/main/java/com/jobdri/jobdri_api/domain/user || true

# also search for "name" field on User via builder or constructor usage
rg -n --hidden -S "new\\s+User\\s*\\(|User\\.builder|\\.name\\s*=\\s*|\\bname\\b\\s*,\\s*.*User" src/main/java/com/jobdri/jobdri_api/domain/user || true

Repository: JobDri-Developer/BackEnd

Length of output: 118


🏁 Script executed:

#!/bin/bash
set -uo pipefail

FILE="src/main/resources/schema.sql"
USER_FILE="src/main/java/com/jobdri/jobdri_api/domain/user/entity/User.java"

echo "== schema.sql: locate CREATE TABLE users block =="
line=$(rg -n "create table users" "$FILE" || true | head -n1 | cut -d: -f1)
echo "create table users line: ${line:-N/A}"
if [ -n "${line:-}" ]; then
  start=$((line>40 ? line-40 : 1))
  end=$((line+140))
  sed -n "${start},${end}p" "$FILE" | cat -n | sed -n '1,220p'
fi

echo
echo "== schema.sql: find column definition for name in users table =="
rg -n -S "users.*name|\\bname\\b" "$FILE" | head -n 80 || true

echo
echo "== schema.sql init / ddl-auto in yaml =="
rg -n -S "spring\\.sql\\.init|ddl-auto" src/main/resources/application-dev.yaml src/main/resources/application-prod.yaml src/test/resources/application-test.yaml || true

echo
echo "== User.java: show fields + signup/createSocialUser =="
sed -n '1,220p' "$USER_FILE" | cat -n | sed -n '1,220p'

echo
echo "== User.name usage: search for .getName() and direct name field usage in domain =="
rg -n --hidden -S "user\\.getName\\s*\\(|\\bgetName\\s*\\(\\s*\\)" src/main/java/com/jobdri/jobdri_api/domain/user src/main/java/com/jobdri/jobdri_api/domain || true

Repository: JobDri-Developer/BackEnd

Length of output: 5395


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Inspect src/main/resources/schema.sql for users/name column =="
wc -l src/main/resources/schema.sql
sed -n '1,160p' src/main/resources/schema.sql | nl -ba | head -n 160
echo
rg -n -S "users|\\buser\\b|\\bname\\b" src/main/resources/schema.sql | head -n 200
echo
# print sections around "users" if present
if rg -n -S -m 1 "users" src/main/resources/schema.sql >/dev/null; then
  line=$(rg -n -S -m 1 "users" src/main/resources/schema.sql | cut -d: -f1)
  start=$((line>120 ? line-120 : 1))
  end=$((line+240))
  sed -n "${start},${end}p" src/main/resources/schema.sql | nl -ba | head -n 260
fi

echo
echo "== Check how schema.sql / sql init is configured in YAML =="
rg -n --hidden -S "spring\\.sql\\.init|schema\\.sql" -g'*.yml' -g'*.yaml' src/main/resources src/test/resources || true

echo
echo "== Inspect ddl-auto config in prod/dev/test =="
for f in src/main/resources/application-dev.yaml src/main/resources/application-prod.yaml src/test/resources/application-test.yaml; do
  echo "--- $f ---"
  sed -n '1,120p' "$f" | nl -ba
done

echo
echo "== Check for Flyway/Liquibase config =="
rg -n --hidden -S "flyway|liquibase" -g'*.yml' -g'*.yaml' -g'*.properties' . || true

echo
echo "== Find where User.signup / createSocialUser are called =="
rg -n --hidden -S "User\\.signup\\s*\\(|User\\.createSocialUser\\s*\\(" src/main/java/com/jobdri/jobdri_api || true

echo
echo "== Inspect CustomOAuth2UserService: how name is derived =="
sed -n '1,140p' src/main/java/com/jobdri/jobdri_api/domain/auth/service/CustomOAuth2UserService.java | nl -ba

echo
echo "== Inspect OAuth2AuthenticationSuccessHandler (if it maps name) =="
sed -n '1,160p' src/main/java/com/jobdri/jobdri_api/domain/auth/handler/OAuth2AuthenticationSuccessHandler.java | nl -ba

echo
echo "== Search for user.name usage in DTOs/services with likely null-sensitivity =="
rg -n --hidden -S "getName\\s*\\(\\s*\\)" src/main/java/com/jobdri/jobdri_api/domain/user || true
rg -n --hidden -S "\\.getName\\s*\\(" src/main/java/com/jobdri/jobdri_api | head -n 200 || true

Repository: JobDri-Developer/BackEnd

Length of output: 228


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== schema.sql (entire file) =="
cat src/main/resources/schema.sql

echo
echo "== Inspect ddl-auto + spring.sql.init in application yaml =="
for f in src/main/resources/application-dev.yaml src/main/resources/application-prod.yaml src/test/resources/application-test.yaml; do
  echo "--- $f ---"
  rg -n "ddl-auto|spring\\.sql\\.init|schema\\.sql" "$f" || true
  sed -n '1,120p' "$f" | cat -n
done

echo
echo "== Flyway/Liquibase config presence (anywhere) =="
rg -n --hidden -S "flyway|liquibase" -g'*.yml' -g'*.yaml' -g'*.properties' . || true

echo
echo "== Search for actual usage of User.getName() (Lombok getter) =="
# direct method calls
rg -n --hidden -S "getName\\s*\\(\\s*\\)" src/main/java/com/jobdri/jobdri_api/domain/user src/main/java/com/jobdri/jobdri_api/domain || true
# patterns that include variables with user context
rg -n --hidden -S "(user|usr|userDto|userDto|principal)\\.[\\w$]*getName\\s*\\(\\s*\\)" src/main/java/com/jobdri/jobdri_api || true
# builder/DTO mapping where user name might be set
rg -n --hidden -S "name\\s*=\\s*.*(user|principal|usr)" src/main/java/com/jobdri/jobdri_api || true

Repository: JobDri-Developer/BackEnd

Length of output: 11928


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Find user.getName() / principal.getName() callsites =="
rg -n --hidden -S "\buser\w*\s*\.\s*getName\s*\(" src/main/java/com/jobdri/jobdri_api || true
rg -n --hidden -S "\bprincipal\w*\s*\.\s*getName\s*\(" src/main/java/com/jobdri/jobdri_api || true
rg -n --hidden -S "\bcurrentUser\w*\s*\.\s*getName\s*\(" src/main/java/com/jobdri/jobdri_api || true

echo
echo "== Show getName() callsites near user DTO/entity types =="
rg -n --hidden -S "getName\\s*\\(\\s*\\)" src/main/java/com/jobdri/jobdri_api/domain | head -n 200 || true

echo
echo "== Search for any usage of field/property named 'name' in User-related code =="
rg -n --hidden -S "\.name\\b" src/main/java/com/jobdri/jobdri_api/domain/user || true

Repository: JobDri-Developer/BackEnd

Length of output: 1388


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Look for migration tooling directories/files (migration/db/flyway/liquibase) =="
# directories named migration/db/flyway/liquibase
find . -maxdepth 6 -type d \( -iname '*migration*' -o -iname '*flyway*' -o -iname '*liquibase*' -o -iname 'db' \) 2>/dev/null | head -n 200

echo
echo "== Look for Flyway versioned SQL files (V__*.sql) =="
find . -maxdepth 8 -type f -iname 'V*.sql' 2>/dev/null | head -n 200

echo
echo "== Look for any SQL that alters users.name =="
rg -n --hidden -S "(alter table\\s+users|create table\\s+users|users\\s*\\(.*name|\\bname\\b.*users)" \
  --glob'*.sql' . || true

echo
echo "== Search for user.name usage in domain/user =="
rg -n --hidden -S "\bUser\b|\\bgetName\\b|\\bname\\b" src/main/java/com/jobdri/jobdri_api/domain/user || true

Repository: JobDri-Developer/BackEnd

Length of output: 2582


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Look for migration tooling directories/files (migration/db/flyway/liquibase) =="
# directories named migration/db/flyway/liquibase
find . -maxdepth 6 -type d \( -iname '*migration*' -o -iname '*flyway*' -o -iname '*liquibase*' -o -iname 'db' \) 2>/dev/null | head -n 200

echo
echo "== Look for Flyway versioned SQL files (V__*.sql) =="
find . -maxdepth 8 -type f -iname 'V*.sql' 2>/dev/null | head -n 200

echo
echo "== Look for any SQL that alters users.name =="
rg -n --hidden -S "(alter table\\s+users|create table\\s+users|users\\s*\\(.*name|\\bname\\b.*users)" \
  --glob'*.sql' . || true

echo
echo "== Search for user.name usage in domain/user =="
rg -n --hidden -S "\bUser\b|\\bgetName\\b|\\bname\\b" src/main/java/com/jobdri/jobdri_api/domain/user || true

Repository: JobDri-Developer/BackEnd

Length of output: 2582


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Inspect src/main/java/.../domain/user/service/UserService.java =="
sed -n '1,200p' src/main/java/com/jobdri/jobdri_api/domain/user/service/UserService.java | cat -n

echo
echo "== List files under domain/user =="
find src/main/java/com/jobdri/jobdri_api/domain/user -maxdepth 4 -type f | head -n 200

echo
echo "== Search for DTOs/mappings that reference User.name =="
rg -n --hidden -S "(User|user)\\.(getName\\s*\\(\\s*\\)|name)\\b" src/main/java/com/jobdri/jobdri_api/domain/user src/main/java/com/jobdri/jobdri_api/domain \
  || true

echo
echo "== Search for potential user-name DTO fields =="
rg -n --hidden -S "\\buser(Name|name)\\b|\\bprofile(Name|name)\\b" src/main/java/com/jobdri/jobdri_api/domain src/main/java/com/jobdri/jobdri_api/global \
  || true

echo
echo "== Broad search for .getName() callsites (first 200 matches) =="
rg -n --hidden -S "\\.getName\\s*\\(\\s*\\)" src/main/java/com/jobdri/jobdri_api | head -n 200 || true

Repository: JobDri-Developer/BackEnd

Length of output: 3335


Add an explicit migration (or guarantee prod schema updates) for users.name nullability

  • User.name is now @Column(nullable = true) (User.java, lines ~33-34). No Flyway/Liquibase migration files/config were found, and src/main/resources/schema.sql does not define the users table/column (it only has extensions/indexes). Production schema updates therefore rely on Hibernate ddl-auto (application-prod.yaml: ${JPA_DDL_AUTO:update}); if JPA_DDL_AUTO is overridden (or disabled) in prod, the column nullability change may not be applied—add a migration or enforce ddl-auto behavior for this change.
  • Null-safety: no callsites of User.getName() / User.name were found beyond the factory methods, but confirm any API/DTO that exposes User.name handles null (and that the contract is updated accordingly).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/main/java/com/jobdri/jobdri_api/domain/user/entity/User.java` around
lines 33 - 34, User.name was changed to nullable via `@Column`(nullable = true)
but no explicit schema migration exists; add a Flyway/Liquibase migration that
alters the users.name column to allow NULL (or add a new migration SQL in
src/main/resources/db/migration) OR ensure production uses Hibernate DDL-auto to
apply this change by documenting/enforcing application-prod.yaml's JPA_DDL_AUTO
value; also audit call sites of User.getName() and any DTOs/serializers that
expose name and update them to accept/serialize null (and update API
contract/docs) to avoid NPEs or contract mismatches.

@shinae1023 shinae1023 merged commit 421a0b8 into main May 22, 2026
3 checks passed
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.

1 participant