-
Notifications
You must be signed in to change notification settings - Fork 0
マイグレーションをAtlasに移行 #1216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
マイグレーションをAtlasに移行 #1216
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates the database migration mechanism to use Atlas, updates the DB initialization, and adjusts configuration and CI to support the new migration workflow.
- Updated table aliases in Gorm migration files to point to new Atlas schema definitions.
- Integrated migration configuration into DB initialization and tests.
- Enhanced Docker, Taskfile, and CI configurations for Atlas migration and linting.
Reviewed Changes
Copilot reviewed 24 out of 31 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/repository/gorm2/migrate/current.go | Updated table aliases to reference the new Atlas schema definitions |
src/repository/gorm2/db_test.go | Added migration configuration mocks for Atlas integration tests |
src/repository/gorm2/db.go | Updated DB initialization to incorporate migration configuration and Atlas |
src/config/v1/migration.go, env.go | Introduced migration configuration interface and environment variables |
src/config/migration.go | Added migration interface definition |
migrations/export.go | Incorporated migration file export using embed.FS |
docs/migration.md | Updated documentation for Atlas migration usage |
docker/dev/compose.yaml, docker/base/compose.yaml | Adjusted Docker configs to support Atlas migration and DB access |
Taskfile.yml | Added new tasks for migration management |
.github/workflows/ci.yaml | Added a CI job for Atlas migration linting |
Files not reviewed (7)
- atlas.hcl: Language not supported
- docker/dev/Dockerfile: Language not supported
- docker/production/Dockerfile: Language not supported
- go.mod: Language not supported
- migrations/20250327121655.sql: Language not supported
- migrations/20250505054607_organize_indices.sql: Language not supported
- migrations/atlas.sum: Language not supported
Comments suppressed due to low confidence (1)
src/repository/gorm2/migrate/current.go:7
- [nitpick] The alias 'GameTable' for a v1 table now references 'schema.GameTable2', which could be confusing. Consider clarifying the naming or adding a comment to indicate that v1 and v2 share the same underlying table.
GameTable = schema.GameTable2
Migrate lint Lint output
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1216 +/- ##
==========================================
- Coverage 49.78% 49.15% -0.64%
==========================================
Files 123 127 +4
Lines 11157 11301 +144
==========================================
Hits 5555 5555
- Misses 5304 5448 +144
Partials 298 298 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Migrate lint Lint output
|
/review |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
fix #1139
マイグレーションに Atlas を使うように変更した