Skip to content

🔧 Settings: 수원 체육시설 및 매칭 더미 데이터 SQL 추가#70

Merged
angoroa merged 2 commits intodevelopfrom
settings/suwon-data
Mar 11, 2026
Merged

🔧 Settings: 수원 체육시설 및 매칭 더미 데이터 SQL 추가#70
angoroa merged 2 commits intodevelopfrom
settings/suwon-data

Conversation

@angoroa
Copy link
Member

@angoroa angoroa commented Mar 9, 2026

#️⃣ Issue Number

📝 요약(Summary)

  • 수원시 공공 체육시설 및 매칭 더미데이터 SQL 추가
  • csv 파일도 탑재

🛠️ PR 유형

어떤 변경 사항이 있나요?

  • 새로운 기능 추가
  • 버그 수정
  • CSS 등 사용자 UI 디자인 변경
  • 코드에 영향을 주지 않는 변경사항(오타 수정, 탭 사이즈 변경, 변수명 변경)
  • 코드 리팩토링
  • 주석 추가 및 수정
  • 문서 수정
  • 테스트 추가, 테스트 리팩토링
  • 빌드 부분 혹은 패키지 매니저 수정
  • 파일 혹은 폴더명 수정
  • 파일 혹은 폴더 삭제

📸스크린샷 (선택)

💬 공유사항 to 리뷰어

중요 !!!!!!!!!!

시퀀스 값이 달라져서 id 값이 너랑 나랑 다를 수도 있으니까 꼭 기존 데이터들 비워주고 실행하기

image

그냥 내가 작성한 SQL 문 차례대로 실행하면 됨

꼭 sql 문 상단에

✅ PR Checklist

PR이 다음 요구 사항을 충족하는지 확인하세요.

  • 커밋 메시지 컨벤션에 맞게 작성했습니다.
  • 변경 사항에 대한 테스트를 했습니다.(버그 수정/기능에 대한 테스트).

Summary by CodeRabbit

릴리스 노트

  • Documentation

    • GitHub 이슈 템플릿 추가로 문서 업데이트 워크플로우 개선
  • Chores

    • 내부 개발 가이드 문서 정리
    • 로컬 개발 환경 스크립트 정리
    • 운동 시설 및 매칭 데이터 갱신

@coderabbitai
Copy link

coderabbitai bot commented Mar 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 9f284c05-81ef-4df6-a793-761feb6cb2bd

📥 Commits

Reviewing files that changed from the base of the PR and between 3820648 and 1528ff9.

📒 Files selected for processing (2)
  • CLAUDE.md
  • Makefile
💤 Files with no reviewable changes (2)
  • Makefile
  • CLAUDE.md

Walkthrough

.github 이슈 템플릿 추가, CLAUDE.md 파일 삭제, 수원시 체육시설 및 매칭 더미 데이터 대량 삽입 SQL 추가, Makefile에서 로컬 docker 관련 타깃 제거가 이루어졌습니다.

Changes

Cohort / File(s) Summary
GitHub 이슈 템플릿
/.github/ISSUE_TEMPLATE/🔧 -settings.md
문서/설정용 새 이슈 템플릿 추가(프론트매터: name, about, title, labels, assignees 및 Description 헤더 포함).
문서 삭제
CLAUDE.md
CLAUDE.md 파일 전부 삭제 — 기존 가이드/명세 내용이 제거됨.
더미 데이터 — 수원시 체육시설 및 매칭
data/suwon_facilities_and_matches.sql
sports_facilities 다수 레코드 삽입(축구/농구/배드민턴/테니스 포함, 주소·좌표·편의시설 등) 및 match_rooms 엔트리 대량 추가.
빌드/운영 스크립트 변경
Makefile
로컬 Docker 관련 Makefile 타깃(up, down, restart, logs) 제거.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🐰 새 템플릿 한 장에 깃발을 꽂고,
사라진 문서는 바람에 흩날리고,
수원 경기장 데이터는 줄지어 늘어서,
메이크 명령 몇 줄은 떠나갔네.
토끼는 깡충, 바삐 기뻐 춤춘다. 🥕✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning CLAUDE.md 파일 삭제, GitHub 이슈 템플릿 추가, Makefile의 docker compose 타겟 제거 등이 #69 이슈의 범위와 무관한 변경사항으로 포함되어 있습니다. #69 이슈의 범위는 수원 체육시설 및 매칭 더미 데이터(CSV, SQL)에만 한정되므로, 관련 없는 파일 삭제 및 설정 변경사항들을 별도 PR로 분리하기를 권장합니다.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 PR의 주요 변경사항인 수원 체육시설 및 매칭 더미 데이터 SQL 추가를 정확하게 반영하고 있습니다.
Linked Issues check ✅ Passed PR은 #69 이슈의 요구사항인 CSV 파일 및 SQL 파일 추가를 충족하고 있으나, 설정 파일 삭제와 같은 추가 변경사항도 포함되어 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch settings/suwon-data

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.

❤️ Share

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

Copy link

@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: 2

🧹 Nitpick comments (1)
data/suwon_facilities_and_matches.sql (1)

1-3: SQL 문 대소문자 일관성 유지 필요

Line 1의 delete는 소문자이고, Lines 2-3의 DELETE는 대문자입니다. 일관성을 위해 모두 대문자로 통일하는 것이 좋습니다.

💅 수정 제안
-delete from match_participants;
+DELETE FROM match_participants;
 DELETE FROM match_rooms;
 DELETE FROM sports_facilities;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@data/suwon_facilities_and_matches.sql` around lines 1 - 3, Normalize SQL
keyword casing by changing the lowercase "delete" to uppercase "DELETE" to match
the other statements; update the statement affecting table match_participants so
all three DDL/DML statements use "DELETE" (reference: the existing statements
operating on match_participants, match_rooms, and sports_facilities).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/ISSUE_TEMPLATE/🔧 -settings.md:
- Around line 1-12: The file .github/ISSUE_TEMPLATE/🔧 -settings.md has a
mismatch between its filename and the frontmatter/template content (the
frontmatter currently defines a Documentation issue template), so either rename
the file to match the template (e.g., 📝-docs.md without the space before the
hyphen) or update the YAML frontmatter (name, about, title, labels) and the
template body to reflect a Settings issue; also remove the space between the
emoji and the hyphen in the filename to avoid tooling issues and ensure the
frontmatter keys (name, about, title) correctly describe "Settings" if you
choose to keep the current filename.

In `@data/suwon_facilities_and_matches.sql`:
- Around line 369-379: The INSERT block in data/suwon_facilities_and_matches.sql
is using hardcoded facility_id values (e.g., 35, 36, 37) which will break if
sequences change; update the script to either (A) ensure the target tables are
truncated with sequence reset before inserts (use TRUNCATE ... RESTART IDENTITY
CASCADE for the facilities/matches tables) or (B) replace the numeric
facility_id literals in the VALUES tuples with a subquery that looks up the id
by facility name (e.g., (SELECT id FROM facilities WHERE name = '...')) so the
INSERTs reference facility_name rather than fixed IDs; apply this change to all
tuples in the SOCCER block so they won't rely on specific sequence values.

---

Nitpick comments:
In `@data/suwon_facilities_and_matches.sql`:
- Around line 1-3: Normalize SQL keyword casing by changing the lowercase
"delete" to uppercase "DELETE" to match the other statements; update the
statement affecting table match_participants so all three DDL/DML statements use
"DELETE" (reference: the existing statements operating on match_participants,
match_rooms, and sports_facilities).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 63c4c122-55ec-49ea-a4b2-67b10794972d

📥 Commits

Reviewing files that changed from the base of the PR and between 1f527ad and 3820648.

⛔ Files ignored due to path filters (1)
  • data/경기도_수원시_공공체육시설현황_20240826.csv is excluded by !**/*.csv
📒 Files selected for processing (3)
  • .github/ISSUE_TEMPLATE/🔧 -settings.md
  • CLAUDE.md
  • data/suwon_facilities_and_matches.sql

Comment on lines +1 to +12
---
name: "\U0001F4DD Documentation"
about: 문서 수정 이슈 템플릿
title: "\U0001F4DDDocs: "
labels: "\U0001F4C3 Docs"
assignees: ''

---

## 📌 Description
-
-
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

파일명과 템플릿 내용 불일치

파일명은 🔧 -settings.md (Settings)인데, 템플릿 내용은 📝 Documentation (문서 수정)용입니다. 의도에 맞게 파일명을 📝-docs.md로 변경하거나, Settings 이슈 템플릿 내용으로 수정해야 합니다.

또한 파일명에 이모지와 하이픈 사이에 공백이 있어 일부 시스템에서 문제가 될 수 있습니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/ISSUE_TEMPLATE/🔧 -settings.md around lines 1 - 12, The file
.github/ISSUE_TEMPLATE/🔧 -settings.md has a mismatch between its filename and
the frontmatter/template content (the frontmatter currently defines a
Documentation issue template), so either rename the file to match the template
(e.g., 📝-docs.md without the space before the hyphen) or update the YAML
frontmatter (name, about, title, labels) and the template body to reflect a
Settings issue; also remove the space between the emoji and the hyphen in the
filename to avoid tooling issues and ensure the frontmatter keys (name, about,
title) correctly describe "Settings" if you choose to keep the current filename.

Comment on lines +369 to +379
-- SOCCER 35~42
('SOCCER', 35, 0, 10, 'OPEN', 60, 3000, NOW() + interval '2 days', 'BRING_OWN', 2, false, NOW(), NOW()),
('SOCCER', 35, 0, 10, 'OPEN', 90, 3000, NOW() + interval '5 days', 'VEST_PROVIDED', 2, true, NOW(), NOW()),
('SOCCER', 36, 0, 8, 'OPEN', 60, 0, NOW() + interval '1 days', 'BRING_OWN', 2, false, NOW(), NOW()),
('SOCCER', 36, 0, 8, 'OPEN', 60, 0, NOW() + interval '4 days', 'BRING_OWN', 2, true, NOW(), NOW()),
('SOCCER', 37, 0, 8, 'OPEN', 60, 0, NOW() + interval '3 days', 'BRING_OWN', 2, false, NOW(), NOW()),
('SOCCER', 38, 0, 8, 'OPEN', 60, 0, NOW() + interval '2 days', 'BRING_OWN', 2, true, NOW(), NOW()),
('SOCCER', 39, 0, 10, 'OPEN', 60, 0, NOW() + interval '1 days', 'BRING_OWN', 2, false, NOW(), NOW()),
('SOCCER', 40, 0, 8, 'OPEN', 60, 0, NOW() + interval '3 days', 'BRING_OWN', 2, false, NOW(), NOW()),
('SOCCER', 41, 0, 8, 'OPEN', 60, 2000, NOW() + interval '4 days', 'BRING_OWN', 2, true, NOW(), NOW()),
('SOCCER', 42, 0, 10, 'OPEN', 60, 2000, NOW() + interval '2 days', 'BRING_OWN', 2, false, NOW(), NOW()),
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

하드코딩된 facility_id 값은 취약한 참조 방식입니다

facility_id로 35, 36, 37 등 고정 값을 사용하고 있습니다. PostgreSQL에서 DELETE는 시퀀스를 리셋하지 않으므로, 스크립트 재실행 시 ID가 예상과 달라질 수 있습니다.

안전한 방법:

  1. TRUNCATE ... RESTART IDENTITY CASCADE를 사용하여 시퀀스 리셋
  2. 또는 서브쿼리로 facility_name 기반 조회
🔧 시퀀스 리셋 방식 예시
-delete from match_participants;
-DELETE FROM match_rooms;
-DELETE FROM sports_facilities;
+TRUNCATE match_participants, match_rooms, sports_facilities RESTART IDENTITY CASCADE;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@data/suwon_facilities_and_matches.sql` around lines 369 - 379, The INSERT
block in data/suwon_facilities_and_matches.sql is using hardcoded facility_id
values (e.g., 35, 36, 37) which will break if sequences change; update the
script to either (A) ensure the target tables are truncated with sequence reset
before inserts (use TRUNCATE ... RESTART IDENTITY CASCADE for the
facilities/matches tables) or (B) replace the numeric facility_id literals in
the VALUES tuples with a subquery that looks up the id by facility name (e.g.,
(SELECT id FROM facilities WHERE name = '...')) so the INSERTs reference
facility_name rather than fixed IDs; apply this change to all tuples in the
SOCCER block so they won't rely on specific sequence values.

@angoroa angoroa merged commit 6fbceb5 into develop Mar 11, 2026
1 check 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.

🔧 Settings: 수원시 공공 체육시설 & 매칭 더미 데이터 추가

1 participant