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

Add CheckPending method to provider #756

Merged
merged 4 commits into from
Apr 25, 2024
Merged

Add CheckPending method to provider #756

merged 4 commits into from
Apr 25, 2024

Conversation

mfridman
Copy link
Collaborator

@mfridman mfridman commented Apr 25, 2024

Quick PR to add a new provider method to check for pending migrations

func (p *Provider) CheckPending(ctx context.Context) (current, target int64, err error) {}

current is the max db version, and target is the max version from the filesystem.

Implementation is similar to #751. See the bit about not respecting the SessionLocker (if one is configured)

  • What is the current version if out-of-order migrations are enabled? Should this method error if that option is enabled or do folks that allow out-of-order migrations already YOLO 🏄‍♂️ and this won't be something that'll matter.

@mfridman mfridman merged commit 6a5697e into master Apr 25, 2024
5 checks passed
@mfridman mfridman deleted the mf/check-pending branch April 25, 2024 23:02
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