Skip to content

feat: [#612] Optimize install DB#1214

Merged
hwbrzzl merged 3 commits intomasterfrom
bowen/optimize-install-db
Oct 3, 2025
Merged

feat: [#612] Optimize install DB#1214
hwbrzzl merged 3 commits intomasterfrom
bowen/optimize-install-db

Conversation

@hwbrzzl
Copy link
Contributor

@hwbrzzl hwbrzzl commented Oct 1, 2025

📑 Description

Relate goravel/goravel#612

  1. Add facades.Schema().Register(database.Kernel{}.Migrations()) and facades.Seeder().Register(database.Kernel{}.Seeders()) when installing Schema and Seeder facades.
image
  1. Fix the cycle import error in the database service provider file given Schema depends on Orm.
image
  1. Add welcome.tmpl when installing Route.

✅ Checks

  • Added test cases for my code

@codecov
Copy link

codecov bot commented Oct 1, 2025

Codecov Report

❌ Patch coverage is 15.52795% with 136 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.82%. Comparing base (1352230) to head (9a5906f).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
route/setup/stubs.go 0.00% 97 Missing ⚠️
http/service_provider.go 0.00% 14 Missing ⚠️
auth/service_provider.go 0.00% 12 Missing ⚠️
schedule/setup/setup.go 0.00% 7 Missing ⚠️
route/setup/setup.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1214      +/-   ##
==========================================
- Coverage   67.11%   66.82%   -0.30%     
==========================================
  Files         236      237       +1     
  Lines       15691    15784      +93     
==========================================
+ Hits        10531    10547      +16     
- Misses       4794     4871      +77     
  Partials      366      366              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ 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: 7cef125 Previous: 1352230 Ratio
BenchmarkFile_ReadWrite 312890 ns/op 6259 B/op 99 allocs/op 193831 ns/op 6257 B/op 99 allocs/op 1.61
BenchmarkFile_ReadWrite - ns/op 312890 ns/op 193831 ns/op 1.61

This comment was automatically generated by workflow using github-action-benchmark.

@hwbrzzl hwbrzzl marked this pull request as ready for review October 3, 2025 07:41
@hwbrzzl hwbrzzl requested a review from a team as a code owner October 3, 2025 07:41
Copilot AI review requested due to automatic review settings October 3, 2025 07:41
Copy link
Contributor

Copilot AI left a 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 optimizes the installation process for database-related packages by introducing automated dependency management and improving the setup workflow. The changes streamline the binding installation process and enhance the developer experience when setting up database functionality.

  • Implements automated dependency calculation to install required bindings together
  • Adds support for installing related bindings simultaneously (e.g., Schema with Orm)
  • Refactors service providers to use a centralized dependency management system

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
support/binding/binding.go New utility for calculating binding dependencies
support/collect/collect.go Adds Diff function for slice comparison
foundation/console/package_install_command.go Updates to use new dependency calculation logic
contracts/binding/binding.go Adds InstallTogether field and reorganizes binding definitions
database/service_provider.go Refactored to use centralized binding dependency management
auth/service_provider.go Updated to use new dependency management pattern
http/service_provider.go Refactored for consistency with new binding system
database/setup/setup.go Enhanced installation workflow with proper facade registration
route/setup/setup.go Adds welcome template creation during Route installation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@hwbrzzl hwbrzzl merged commit 179304d into master Oct 3, 2025
12 of 14 checks passed
@hwbrzzl hwbrzzl deleted the bowen/optimize-install-db branch October 3, 2025 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants