nitrictech / cli

Nitric CLI. Manage and run Nitric apps locally and deploy to any cloud.
https://nitric.io
Apache License 2.0
26 stars 10 forks source link

feat: local sql migrations #780

Closed davemooreuws closed 2 months ago

davemooreuws commented 2 months ago

Ability to build and run local migrations on nitric start and run via the "Run migrations" button.

Closes https://github.com/nitrictech/nitric/issues/660

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 0% with 269 lines in your changes missing coverage. Please review.

Project coverage is 2.95%. Comparing base (19f77bb) to head (712f29a). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/project/migrations.go 0.00% 86 Missing :warning:
pkg/cloud/sql/sql.go 0.00% 53 Missing :warning:
pkg/dashboard/handlers.go 0.00% 40 Missing :warning:
pkg/dashboard/dashboard.go 0.00% 30 Missing :warning:
pkg/view/tui/commands/local/run.go 0.00% 18 Missing :warning:
pkg/project/service.go 0.00% 15 Missing :warning:
pkg/collector/spec.go 0.00% 11 Missing :warning:
pkg/system/logs.go 0.00% 8 Missing :warning:
pkg/project/project.go 0.00% 4 Missing :warning:
pkg/cloud/gateway/gateway.go 0.00% 3 Missing :warning:
... and 1 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #780 +/- ## ======================================== + Coverage 2.84% 2.95% +0.10% ======================================== Files 82 82 Lines 9132 9342 +210 ======================================== + Hits 260 276 +16 - Misses 8860 9054 +194 Partials 12 12 ``` | [Flag](https://app.codecov.io/gh/nitrictech/cli/pull/780/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nitrictech) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/nitrictech/cli/pull/780/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nitrictech) | `2.95% <0.00%> (+0.10%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nitrictech#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tjholm commented 2 months ago

@davemooreuws have made changes to move service/migrations back to the project package for now. I've also changed to exit service to a system logging service that logs in the CLI along with running nitric services as the "nitric" service in order to side log runtime errors rather than exiting the CLI for now.

Can you re-test to make sure everything is working as you expect.

davemooreuws commented 2 months ago

@davemooreuws have made changes to move service/migrations back to the project package for now. I've also changed to exit service to a system logging service that logs in the CLI along with running nitric services as the "nitric" service in order to side log runtime errors rather than exiting the CLI for now.

Can you re-test to make sure everything is working as you expect.

Tested, works great!

nitric-bot commented 2 months ago

:tada: This PR is included in version 1.53.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: