Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1261 +/- ##
==========================================
+ Coverage 67.96% 68.04% +0.08%
==========================================
Files 261 261
Lines 15186 15271 +85
==========================================
+ Hits 10321 10391 +70
- Misses 4423 4432 +9
- Partials 442 448 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for registering database migrations in the application setup process through a new WithMigrations method on the ApplicationBuilder. The changes enable developers to programmatically register migrations either through the bootstrap setup or the traditional kernel approach, enhancing the framework's extensibility for database schema management.
- Introduces
WithMigrationsmethod toApplicationBuilderfor migration registration - Adds
AddMigrationutility function for programmatic code modification - Updates
make:migrationcommand to automatically register migrations based on setup type
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| contracts/foundation/application_builder.go | Adds WithMigrations method signature to the ApplicationBuilder interface |
| foundation/application_builder.go | Implements WithMigrations method and migration registration logic in Create |
| foundation/application_builder_test.go | Adds comprehensive test coverage for WithMigrations functionality |
| mocks/foundation/ApplicationBuilder.go | Auto-generated mock for the new WithMigrations method |
| support/console/console.go | Adds GetName getter method to expose migration name |
| database/console/migration/migrate_make_command.go | Updates migration creation to support both bootstrap and kernel registration approaches |
| packages/modify/actions.go | Implements AddMigration function and supporting utilities for AST manipulation |
| packages/modify/actions_test.go | Adds extensive test coverage for migration registration code modification |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.
| Benchmark suite | Current: 364f945 | Previous: 953062f | Ratio |
|---|---|---|---|
Benchmark_Fatal |
4e-7 ns/op 0 B/op 0 allocs/op |
2e-7 ns/op 0 B/op 0 allocs/op |
2 |
Benchmark_Fatal - ns/op |
4e-7 ns/op |
2e-7 ns/op |
2 |
This comment was automatically generated by workflow using github-action-benchmark.
📑 Description
Closes goravel/goravel#796
This pull request introduces support for registering database migrations in the application setup process. It adds a new
WithMigrationsmethod to theApplicationBuilder, updates related tests and mocks, and provides utilities for programmatically modifying code to register migrations. The changes enhance the framework's extensibility for database schema management.✅ Checks