diff --git a/250814_rb8001_통합_트러블슈팅.md b/250814_rb8001_통합_트러블슈팅.md index 73102ea..e46186e 100644 --- a/250814_rb8001_통합_트러블슈팅.md +++ b/250814_rb8001_통합_트러블슈팅.md @@ -195,7 +195,7 @@ sshpass -p "19800508" ssh -o StrictHostKeyChecking=no -f -N \ **최종 설정**: ```bash # .env -DATABASE_URL=postgresql://robeings:robeings@localhost:5433/auth_db +DATABASE_URL=postgresql://robeings:robeings@localhost:5433/main_db PORT=8507 ``` @@ -310,7 +310,7 @@ curl http://localhost:8507/health ps aux | grep "5433:localhost:5432" # PostgreSQL 접속 테스트 -PGPASSWORD=19800508 psql -h localhost -p 5433 -U admin -d auth_db +PGPASSWORD=19800508 psql -h localhost -p 5433 -U admin -d main_db ``` --- diff --git a/250817_email_skill_integration_status.md b/250817_email_skill_integration_status.md index f1457f1..6c857b0 100644 --- a/250817_email_skill_integration_status.md +++ b/250817_email_skill_integration_status.md @@ -212,7 +212,7 @@ async def compose_email(request): Host: 124.55.18.179 Port: 51123 User: heejae -Database: auth_db +Database: main_db PostgreSQL User: robeings/robeings ``` diff --git a/250818_gmail_tokens_database_setup.md b/250818_gmail_tokens_database_setup.md index f8a1e41..610bd10 100644 --- a/250818_gmail_tokens_database_setup.md +++ b/250818_gmail_tokens_database_setup.md @@ -11,7 +11,7 @@ ```bash Host: localhost Port: 5432 -Database: auth_db +Database: main_db User: robeings Password: robeings ``` @@ -194,7 +194,7 @@ from psycopg2.extras import RealDictCursor # 연결 conn = psycopg2.connect( host="localhost", - database="auth_db", + database="main_db", user="robeings", password="robeings" ) diff --git a/300_architecture/database/README.md b/300_architecture/database/README.md index a569208..1a96c82 100644 --- a/300_architecture/database/README.md +++ b/300_architecture/database/README.md @@ -22,7 +22,7 @@ ## 데이터베이스 정보 - **Host**: 192.168.219.45 (51123 서버) - **Port**: 5432 -- **Database**: auth_db +- **Database**: main_db - **User**: robeings - **Password**: robeings diff --git a/300_architecture/database/tables.md b/300_architecture/database/tables.md index 44903e2..3aa6fbc 100644 --- a/300_architecture/database/tables.md +++ b/300_architecture/database/tables.md @@ -1,7 +1,7 @@ # PostgreSQL 테이블 구조 ## 작성일: 2025-08-20 -## 데이터베이스: auth_db +## 데이터베이스: main_db --- diff --git a/_archive/docs/architecture/auth-server-database-schema.md b/_archive/docs/architecture/auth-server-database-schema.md index 55e51c1..3e00e69 100644 --- a/_archive/docs/architecture/auth-server-database-schema.md +++ b/_archive/docs/architecture/auth-server-database-schema.md @@ -1,7 +1,7 @@ # auth-server 데이터베이스 스키마 **날짜**: 2025-07-29 -**데이터베이스**: auth_db (PostgreSQL) +**데이터베이스**: main_db (PostgreSQL) **목적**: 멀티테넌트 B2B Slack 봇 인증 관리 시스템 ## 개요 diff --git a/_archive/docs/architecture/frontend-architecture-strategy.md b/_archive/docs/architecture/frontend-architecture-strategy.md index dbd753c..13675cd 100644 --- a/_archive/docs/architecture/frontend-architecture-strategy.md +++ b/_archive/docs/architecture/frontend-architecture-strategy.md @@ -87,7 +87,7 @@ ```sql -- PostgreSQL@51123:5432 -├── auth_db (기존) +├── main_db (기존) │ ├── companies │ └── slack_workspaces │ @@ -117,7 +117,7 @@ WS /ws/robbing/realtime # 실시간 상태 업데이트 **위치**: auth-server 내장 또는 별도 React 앱 **데이터 저장**: -- 회사 정보: PostgreSQL `auth_db.companies` +- 회사 정보: PostgreSQL `main_db.companies` - 세션 관리: JWT 토큰 - OAuth 토큰: 파일시스템 `/tokens/` diff --git a/ideas/250818_conversation_logs_및_robing_stats_활용_계획.md b/ideas/250818_conversation_logs_및_robing_stats_활용_계획.md index 1e7ef60..2218980 100644 --- a/ideas/250818_conversation_logs_및_robing_stats_활용_계획.md +++ b/ideas/250818_conversation_logs_및_robing_stats_활용_계획.md @@ -8,7 +8,7 @@ ### 1.1 미사용 테이블 현황 ```sql --- auth_db에 존재하지만 전혀 사용되지 않는 테이블들 +-- main_db에 존재하지만 전혀 사용되지 않는 테이블들 conversation_logs: 0 records (0 KB) robing_stats: 0 records (0 KB) robing_settings: 0 records (0 KB) diff --git a/ideas/250819_claude_사용자구분및ChromaDB격리문제.md b/ideas/250819_claude_사용자구분및ChromaDB격리문제.md index 777b89e..ac94c96 100644 --- a/ideas/250819_claude_사용자구분및ChromaDB격리문제.md +++ b/ideas/250819_claude_사용자구분및ChromaDB격리문제.md @@ -178,7 +178,7 @@ CREATE TABLE user_identity_mapping ( ### slack_user_mapping 테이블 검증 완료 #### 데이터베이스 상태 -- **테이블 존재**: ✅ auth_db.slack_user_mapping +- **테이블 존재**: ✅ main_db.slack_user_mapping - **정확한 매핑 데이터**: ``` U0925SXQFDK → aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa → 김종태 diff --git a/ideas/auth_system_analysis.md b/ideas/auth_system_analysis.md index 24a93d3..fb70a09 100644 --- a/ideas/auth_system_analysis.md +++ b/ideas/auth_system_analysis.md @@ -2,7 +2,7 @@ ## 현재 구조 분석 -### 1. 데이터베이스 (PostgreSQL - auth_db) +### 1. 데이터베이스 (PostgreSQL - main_db) #### Users 테이블 구조 ```sql @@ -294,7 +294,7 @@ email ↔ slack_id ↔ username - 결과: 동일 username으로 통합 메모리 ``` -**관련 문서**: [Auth DB 테이블 구조 단순화 방안](/plans/250812_auth_db_테이블_단순화_방안.md) +**관련 문서**: [Auth DB 테이블 구조 단순화 방안](/plans/250812_main_db_테이블_단순화_방안.md) ##### 현재 테이블 구조 (5개) - **users**: 사용자 기본 정보 (email, username) diff --git a/plans/250819_gmail_item_implementation_plan.md b/plans/250819_gmail_item_implementation_plan.md index ad85529..2fd44f2 100644 --- a/plans/250819_gmail_item_implementation_plan.md +++ b/plans/250819_gmail_item_implementation_plan.md @@ -334,7 +334,7 @@ POSTGRES_HOST=192.168.219.45 POSTGRES_PORT=5432 # 공통 -POSTGRES_DB=auth_db +POSTGRES_DB=main_db POSTGRES_USER=robeings POSTGRES_PASSWORD=robeings ``` @@ -344,16 +344,16 @@ POSTGRES_PASSWORD=robeings # rb8001 (51124 서버) SKILL_EMAIL_URL=http://localhost:8501 # host 모드이므로 localhost STATE_SERVICE_URL=http://localhost:9024 -DATABASE_URL=postgresql://robeings:robeings@192.168.219.45:5432/auth_db +DATABASE_URL=postgresql://robeings:robeings@192.168.219.45:5432/main_db # skill-email (51124 서버) TOKEN_PROVIDER=database # file → database -POSTGRES_CONNECTION_STRING=postgresql://robeings:robeings@192.168.219.45:5432/auth_db +POSTGRES_CONNECTION_STRING=postgresql://robeings:robeings@192.168.219.45:5432/main_db # robeing-monitor (51124 서버) PORT=9024 SERVICE_NAME=robeing-monitor -DATABASE_URL=postgresql://robeings:robeings@192.168.219.45:5432/auth_db +DATABASE_URL=postgresql://robeings:robeings@192.168.219.45:5432/main_db ``` --- diff --git a/plans/README.md b/plans/README.md index 54b7a8c..efed14a 100644 --- a/plans/README.md +++ b/plans/README.md @@ -10,7 +10,7 @@ ## 현재 진행 중인 계획들 ### 1. Slack 통합 개선 -- `250812_auth_db_테이블_단순화_방안.md` - DB 구조 개선 계획 +- `250812_main_db_테이블_단순화_방안.md` - DB 구조 개선 계획 - `250812_로컬개발자_Slack사용자매핑_구현계획.md` - Slack 사용자 매핑 구현 ### 2. 서비스 구조화 diff --git a/plans/completed/250819_rb8001_gmail_integration_completed.md b/plans/completed/250819_rb8001_gmail_integration_completed.md index ebd214a..4c458ab 100644 --- a/plans/completed/250819_rb8001_gmail_integration_completed.md +++ b/plans/completed/250819_rb8001_gmail_integration_completed.md @@ -28,7 +28,7 @@ SKILL_EMAIL_URL=http://localhost:8501 MONITOR_SERVICE_URL=http://localhost:9024 # PostgreSQL for Gmail tokens (SSH tunnel) -POSTGRES_CONNECTION_STRING=postgresql://robeings:robeings@localhost:5433/auth_db +POSTGRES_CONNECTION_STRING=postgresql://robeings:robeings@localhost:5433/main_db ``` ### 2.2 Gmail 통합 모듈 구현 @@ -370,7 +370,7 @@ curl -X POST http://localhost:8501/process \ # PostgreSQL 장착 상태 확인 python3 -c " import psycopg2 -conn = psycopg2.connect('postgresql://robeings:robeings@localhost:5433/auth_db') +conn = psycopg2.connect('postgresql://robeings:robeings@localhost:5433/main_db') cur = conn.cursor() cur.execute('SELECT user_id, is_equipped FROM gmail_tokens') for row in cur.fetchall(): diff --git a/plans/completed/250819_skill_email_db_connection_completed.md b/plans/completed/250819_skill_email_db_connection_completed.md index a781d88..0153c75 100644 --- a/plans/completed/250819_skill_email_db_connection_completed.md +++ b/plans/completed/250819_skill_email_db_connection_completed.md @@ -36,7 +36,7 @@ PORT=8501 TOKEN_PROVIDER=database # PostgreSQL Connection (SSH tunnel) -POSTGRES_CONNECTION_STRING=postgresql://robeings:robeings@localhost:5433/auth_db +POSTGRES_CONNECTION_STRING=postgresql://robeings:robeings@localhost:5433/main_db # Service Name SERVICE_NAME=skill-email @@ -195,7 +195,7 @@ sshpass -p "19800508" ssh -f -N -L 5433:localhost:5432 admin@124.55.18.179 -p 51 - 로컬 포트 5433 → 원격 PostgreSQL 5432 - 51123 서버 (124.55.18.179)의 PostgreSQL 접근 -- auth_db 데이터베이스 사용 +- main_db 데이터베이스 사용 --- @@ -326,7 +326,7 @@ sshpass -p "19800508" ssh -f -N -L 5433:localhost:5432 admin@124.55.18.179 -p 51 # 토큰 상태 확인 python3 -c " import psycopg2 -conn = psycopg2.connect('postgresql://robeings:robeings@localhost:5433/auth_db') +conn = psycopg2.connect('postgresql://robeings:robeings@localhost:5433/main_db') cur = conn.cursor() cur.execute('SELECT user_id, is_equipped FROM gmail_tokens') for row in cur.fetchall(): diff --git a/troubleshooting/250729_happybell80_서비스구축및배포복구.md b/troubleshooting/250729_happybell80_서비스구축및배포복구.md index 83b8b9d..09c1677 100644 --- a/troubleshooting/250729_happybell80_서비스구축및배포복구.md +++ b/troubleshooting/250729_happybell80_서비스구축및배포복구.md @@ -189,7 +189,7 @@ Claude가 세션 시작 시 규칙을 제대로 따르지 않음. CLAUDE.md 재 - nginx를 통한 https://auth.ro-being.com 프록시 설정 확인 - JWT/OAuth 키 관리 상태 점검 -2. **PostgreSQL auth_db 스키마 분석**: +2. **PostgreSQL main_db 스키마 분석**: - `companies` 테이블: 회사별 서브도메인 관리 (2개 회사 등록) - `slack_workspaces` 테이블: Slack 봇 토큰 관리 (2개 워크스페이스 활성) - 멀티테넌트 B2B SaaS 구조 확인 diff --git a/troubleshooting/250803_PostgreSQL_SSH_터널_연결.md b/troubleshooting/250803_PostgreSQL_SSH_터널_연결.md index 897993a..6375bd7 100644 --- a/troubleshooting/250803_PostgreSQL_SSH_터널_연결.md +++ b/troubleshooting/250803_PostgreSQL_SSH_터널_연결.md @@ -14,7 +14,7 @@ sshpass -p '19800508' ssh -N -L 5433:localhost:5432 admin@124.55.18.179 -p 51123 ### 2. .env 파일 설정 ```bash # /home/heejae/robing-state-service/.env -DATABASE_URL=postgresql://robeings:robeings@localhost:5433/auth_db +DATABASE_URL=postgresql://robeings:robeings@localhost:5433/main_db SERVICE_NAME=state PORT=8002 LOG_LEVEL=INFO @@ -23,7 +23,7 @@ LOG_LEVEL=INFO ### 3. 연결 확인 ```bash # psql로 테스트 -psql postgresql://robeings:robeings@localhost:5433/auth_db -c "SELECT 1" +psql postgresql://robeings:robeings@localhost:5433/main_db -c "SELECT 1" ``` ## 연결 정보 @@ -33,7 +33,7 @@ psql postgresql://robeings:robeings@localhost:5433/auth_db -c "SELECT 1" - **SSH 비밀번호**: 19800508 - **PostgreSQL 사용자**: robeings - **PostgreSQL 비밀번호**: robeings -- **데이터베이스**: auth_db +- **데이터베이스**: main_db ## 주의사항 1. SSH 터널은 백그라운드에서 실행되므로 시스템 재시작 시 다시 생성 필요 diff --git a/troubleshooting/250809_happybell80_robing-gateway구현.md b/troubleshooting/250809_happybell80_robing-gateway구현.md index d49ffba..4edc1e3 100644 --- a/troubleshooting/250809_happybell80_robing-gateway구현.md +++ b/troubleshooting/250809_happybell80_robing-gateway구현.md @@ -32,13 +32,13 @@ robing-gateway/ **핵심 기능**: 1. 사용자-로빙 매핑 관리 2. 메모리 캐시로 성능 최적화 -3. 기존 auth_db 테이블 활용 (workspaces, workspace_members) +3. 기존 main_db 테이블 활용 (workspaces, workspace_members) 4. 헬스체크 및 모니터링 엔드포인트 ### 23서버팀 피드백 **중요 변경사항 - 새 테이블 불필요**: -- 기존 auth_db의 workspaces, workspace_members 테이블 활용 +- 기존 main_db의 workspaces, workspace_members 테이블 활용 - workspace_members에서 user_id로 robing 정보 조회 - JOIN 쿼리로 사용자 → 워크스페이스 → 로빙 매핑 @@ -81,7 +81,7 @@ body = { **해결**: ```yaml # .env.example 수정 -DATABASE_URL=postgresql+asyncpg://robeings:패스워드@host.docker.internal:5432/auth_db +DATABASE_URL=postgresql+asyncpg://robeings:패스워드@host.docker.internal:5432/main_db ``` ### 문제 4: Gitea Actions 환경변수 @@ -108,7 +108,7 @@ SELECT COUNT(*) FROM workspaces; # 2 (테스트 데이터) **현재 상태**: - robing-gateway 포트 8100에서 정상 실행 -- PostgreSQL auth_db 연결 성공 +- PostgreSQL main_db 연결 성공 - DEFAULT_ROBING_ID: rb10508_micro 설정 - 메모리 캐시 활성화 (30분 TTL) diff --git a/troubleshooting/250818_happybell80_대화히스토리구현.md b/troubleshooting/250818_happybell80_대화히스토리구현.md index fc30318..3ca5241 100644 --- a/troubleshooting/250818_happybell80_대화히스토리구현.md +++ b/troubleshooting/250818_happybell80_대화히스토리구현.md @@ -304,17 +304,17 @@ const response = await fetch(`${ROBING_API_URL}/api/history?${params}`) ### 원인 분석 ```yaml # docker-compose.yml 기본값 (틀림) -DATABASE_URL=postgresql+asyncpg://postgres:postgres@host.docker.internal:5432/auth_db +DATABASE_URL=postgresql+asyncpg://postgres:postgres@host.docker.internal:5432/main_db # 실제 필요한 값 -DATABASE_URL=postgresql+asyncpg://robeings:robeings@host.docker.internal:5432/auth_db +DATABASE_URL=postgresql+asyncpg://robeings:robeings@host.docker.internal:5432/main_db ``` ### 해결 과정 (51123 서버) 1. **환경변수 수정** ```bash cd /home/admin/ivada_project/robeing-gateway -echo 'DATABASE_URL=postgresql+asyncpg://robeings:robeings@host.docker.internal:5432/auth_db' > .env +echo 'DATABASE_URL=postgresql+asyncpg://robeings:robeings@host.docker.internal:5432/main_db' > .env ``` 2. **컨테이너 재시작** @@ -327,7 +327,7 @@ docker-compose up -d ```bash docker logs robing-gateway --tail 50 # "Database connection established successfully" 확인 -# "All required tables found in auth_db" 확인 +# "All required tables found in main_db" 확인 ``` ### 해결 결과 diff --git a/troubleshooting/250820_happybell80_사용자별로빙동적할당구현.md b/troubleshooting/250820_happybell80_사용자별로빙동적할당구현.md index d8dea6b..7746d72 100644 --- a/troubleshooting/250820_happybell80_사용자별로빙동적할당구현.md +++ b/troubleshooting/250820_happybell80_사용자별로빙동적할당구현.md @@ -118,7 +118,7 @@ async def get_stats(robing_id: str): port=5432, user='robeings', password='robeings', - database='auth_db' + database='main_db' ) # robing_stats 테이블 조회