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

feat: add migrate sql up|down|status #4228

Merged
merged 1 commit into from
Nov 27, 2024
Merged

feat: add migrate sql up|down|status #4228

merged 1 commit into from
Nov 27, 2024

Conversation

aeneasr
Copy link
Member

@aeneasr aeneasr commented Nov 27, 2024

This patch adds the ability to execute down migrations using:

kratos migrate sql down -e --steps {num_of_steps}

Please read kratos migrate sql down --help carefully.

Going forward, please use the following commands

kratos migrate sql up ...
kratos migrate sql status ...

instead of the previous, now deprecated

kratos migrate sql ...
kratos migrate status ...

commands.

See https://github.com/ory-corp/cloud/issues/7350

Related issue(s)

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    security@ory.sh) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

This patch adds the ability to execute down migrations using:

```
kratos migrate sql down -e --steps {num_of_steps}
```

Please read `kratos migrate sql down --help` carefully.

Going forward, please use the following commands

```
kratos migrate sql up ...
kratos migrate sql status ...
```

instead of the previous, now deprecated

```
kratos migrate sql ...
kratos migrate status ...
```

commands.

See ory-corp/cloud#7350
Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 41.86047% with 25 lines in your changes missing coverage. Please review.

Project coverage is 78.55%. Comparing base (e6d2d4d) to head (5af2c10).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
cmd/cliclient/migrate.go 23.80% 15 Missing and 1 partial ⚠️
cmd/migrate/root.go 35.71% 6 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4228      +/-   ##
==========================================
+ Coverage   78.52%   78.55%   +0.02%     
==========================================
  Files         380      380              
  Lines       27231    27267      +36     
==========================================
+ Hits        21383    21419      +36     
- Misses       4224     4225       +1     
+ Partials     1624     1623       -1     

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

@aeneasr aeneasr merged commit e6fa520 into master Nov 27, 2024
27 of 29 checks passed
@aeneasr aeneasr deleted the migrate-improve branch November 27, 2024 13:12
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.

1 participant