cli icon indicating copy to clipboard operation
cli copied to clipboard

feat: local sql migrations

Open davemooreuws opened this issue 1 year ago • 2 comments

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

davemooreuws avatar Aug 30 '24 02:08 davemooreuws

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
@@           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 Coverage Δ
unittests 2.95% <0.00%> (+0.10%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

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

codecov[bot] avatar Sep 02 '24 05:09 codecov[bot]

@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.

tjholm avatar Sep 11 '24 05:09 tjholm

@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!

davemooreuws avatar Sep 13 '24 01:09 davemooreuws

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

The release is available on GitHub release

Your semantic-release bot :package::rocket:

nitric-bot avatar Sep 13 '24 05:09 nitric-bot