Skip to content
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

Update migrate.go #1059

Closed
wants to merge 1 commit into from
Closed

Conversation

avocadodefi
Copy link

@avocadodefi avocadodefi commented Dec 26, 2023

Unused embedMigrations in Migrate Function: You set embedMigrations as the base filesystem for goose, but then in the Migrate function, you use MigrationsDir which points to a local directory. onsistent Use of Constants: In the init function, you've correctly used the MigrationsDir constant, but in the commented line within the Migrate function, MIGRATIONS_DIR is referenced. It should be consistent. Error handling for the environment variable parsing and some minor adjustments for consistency and clarity.

Purpose or design rationale of this PR

Describe your change. Make sure to answer these three questions: What does this PR do? Why does it do it? How does it do it?

PR title

Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:

  • build: Changes that affect the build system or external dependencies (example scopes: yarn, eslint, typescript)
  • ci: Changes to our CI configuration files and scripts (example scopes: vercel, github, cypress)
  • docs: Documentation-only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that doesn't fix a bug, or add a feature, or improves performance
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • test: Adding missing tests or correcting existing tests

Deployment tag versioning

Has tag in common/version.go been updated or have you added bump-version label to this PR?

  • No, this PR doesn't involve a new deployment, git tag, docker image tag
  • Yes

Breaking change label

Does this PR have the breaking-change label?

  • No, this PR is not a breaking change
  • Yes

Unused embedMigrations in Migrate Function: You set embedMigrations as the base filesystem for goose, but then in the Migrate function, you use MigrationsDir which points to a local directory. 
onsistent Use of Constants: In the init function, you've correctly used the MigrationsDir constant, but in the commented line within the Migrate function, MIGRATIONS_DIR is referenced. It should be consistent.
Error handling for the environment variable parsing and some minor adjustments for consistency and clarity.
Copy link

codecov bot commented Dec 27, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (0cb29c3) 48.90% compared to head (73299d3) 48.91%.

Files Patch % Lines
database/migrate/migrate.go 80.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1059   +/-   ##
========================================
  Coverage    48.90%   48.91%           
========================================
  Files          158      158           
  Lines        12710    12712    +2     
========================================
+ Hits          6216     6218    +2     
  Misses        6064     6064           
  Partials       430      430           
Flag Coverage Δ
coordinator 18.91% <ø> (ø)
database 43.45% <80.00%> (+0.59%) ⬆️
rollup 66.00% <ø> (ø)

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

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

@georgehao
Copy link
Member

I think this is a wrong PR. just close it

@georgehao georgehao closed this Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants