feat(music-lab): video_projects·revenue_records DB 마이그레이션 + CRUD

- init_db()에 video_projects, revenue_records 테이블 추가 (CREATE IF NOT EXISTS)
- video_projects CRUD: create/get/get_all/update_status/delete + get_track_by_id
- revenue_records CRUD: create/get_all/update/delete/get_revenue_dashboard (RPM 자동 계산)
- TDD: tests/test_db_video.py 5개 테스트 모두 PASSED
- pytest.ini 추가 (pythonpath=. 설정)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-01 11:41:07 +09:00
parent 88b5ea9ce2
commit a5495aeaa4
5 changed files with 325 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
import pytest
@pytest.fixture
def tmp_db(tmp_path, monkeypatch):
db_path = str(tmp_path / "test_music.db")
monkeypatch.setattr("app.db.DB_PATH", db_path)
return db_path