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

Implemention GetLatestVersion for all natively supported dialects #758

Merged
merged 7 commits into from
Apr 26, 2024

Conversation

mfridman
Copy link
Collaborator

@mfridman mfridman commented Apr 26, 2024

Fix #673

This PR implements:

// GetLatestVersion retrieves the last applied migration version. If no migrations exist, this
// method must return -1 and no error.
GetLatestVersion(ctx context.Context, db DBTxConn) (int64, error)

, for all natively supported dialects. They all support a max function over the version_id, meaning we don't need to fetch all versions, sort, grab the latest and discard.

@mfridman mfridman merged commit 272603b into master Apr 26, 2024
5 checks passed
@mfridman mfridman deleted the mf/latest-version branch April 26, 2024 18:06
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.

feat: Expand Store interface; add GetLatestVersion method in Provider
1 participant