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

Remove explicit failure in WithDisableGlobalRegistry #783

Merged
merged 4 commits into from
Jun 25, 2024
Merged

Conversation

mfridman
Copy link
Collaborator

@mfridman mfridman commented Jun 25, 2024

Fix #782

This PR updates the behavior of the provider WithDisableGlobalRegistry option, specifically removing this check:

if len(global) > 0 {
	return nil, errors.New("global registry disabled, but provider has registered go migrations")
}

Allowing programs to have multiple providers who may be running in a (legacy) environment with globaly-registered migrations. By removing this check, the caller can now explicitly disable global migrations and isolate go migrations to the current provider with WithGoMigrations.

TL;DR - the combination of WithGoMigrations and WithDisableGlobalRegistry allows you to have a fully isolated provider.

  • Decide whether this should log a warning, or simple ignore and do nothing

@mfridman mfridman merged commit 7536ecd into master Jun 25, 2024
5 checks passed
@mfridman mfridman deleted the mf/gh782 branch June 25, 2024 13:36
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.

Local scope for provider go migrations
1 participant