[P0-1] users 테이블 중복 컬럼 제거 마이그레이션

ID: 3ce383bb-b594-48b3-b7b9-1934a0a0d530

높음 완료

## 목표
users 테이블에서 user_settings와 중복되는 3개 컬럼을 제거하는 마이그레이션 생성 및 실행

## 제거 대상
- `notification_enabled` (boolean, default: false)
- `notification_time` (integer)
- `current_session_id` (string)

이 3개 컬럼은 user_settings 테이블에도 동일하게 존재하며, 코드에서는 모두 `user_setting.xxx`로 접근합니다.

## 작업 순서
1. `grep -r "users\.\(notification_enabled\|notification_time\|current_session_id\)" app/` 로 코드 참조 없음 재확인
2. `bin/rails generate migration RemoveDuplicateColumnsFromUsers` 실행
3. 마이그레이션 파일에 remove_column 3개 작성
4. `bin/rails db:migrate` 실행
5. `bin/rails test` 전체 테스트 실행 → 0 failures 확인

## 주의사항
- SQLite remove_column은 테이블 재생성 → uuid 타입 소실 가능성 확인
- db/structure.sql 자동 갱신 확인
- 마이그레이션 후 User 모델에서 해당 컬럼 참조가 없는지 확인
- seeds.rb에서 해당 컬럼 사용 여부 확인

## 완료 기준
- 마이그레이션 성공
- 전체 테스트 통과 (430+ tests, 0 failures)
- structure.sql에서 3개 컬럼 제거 확인

첨부 이미지

이미지 추가 (Ctrl+V로 붙여넣기 또는 클릭)

JPEG, PNG, GIF, WebP / 최대 10MB

담당자: schema-dev
생성일: 2026년 03월 02일 12:16

활동 로그

  • 팀리드 상태 변경: 리뷰 → 완료

    2026년 03월 03일 05:21:27

  • S
    schema-dev 상태 변경: 할 일 → 리뷰

    2026년 03월 02일 12:27:35

  • S
    schema-dev 스키마 중복 컬럼 제거 완료

    2026년 03월 02일 12:27:34

    상세 보기

    ## 완료 사항

    ### 마이그레이션
    - `db/migrate/20260302150005_remove_duplicate_columns_from_users.rb` 생성
    - users 테이블에서 3개 중복 컬럼 제거:
    - `notification_enabled` (boolean) - user_settings에 존재
    - `notification_time` (integer) - user_settings에 존재
    - `current_session_id` (string) - user_settings에 존재

    ### 수정 파일
    - `test/fixtures/users.yml` - users fixture에서 `notification_enabled`, `notification_time` 제거
    - `db/structure.sql` - Ruby로 수동 덤프 (sqlite3 CLI 미설치로 자동 덤프 실패)

    ### 테스트 결과
    - 관련 테스트 39건 전체 통과 (0 failures, 0 errors)
    - UserTest: 11 tests
    - UserSettingTest: 8 tests
    - SettingsControllerTest: 6 tests
    - NotificationCronJobTest: 3 tests
    - QtSessionsControllerTest 등

    ### 참고
    - UUID PK 소실 없이 정상 마이그레이션 완료
    - sqlite3 CLI가 PATH에 없어 db:schema:dump 실패 → Ruby로 structure.sql 수동 덤프
    - 전체 테스트 시 다른 에이전트 동시 실행으로 SQLite BusyException 발생하지만, 단독 실행 시 0 failures

  • S
    schema-dev 스키마 중복 컬럼 제거 작업 시작

    2026년 03월 02일 12:18:44

    상세 보기

    ## 작업 대상
    - users 테이블에서 user_settings와 중복되는 3개 컬럼 제거:
    - `notification_enabled` (boolean)
    - `notification_time` (integer)
    - `current_session_id` (string)

    ## 진행 순서
    1. 코드에서 직접 참조 확인 (Grep)
    2. 마이그레이션 생성 및 실행
    3. 전체 테스트 통과 확인