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

DefaultSlickApi is unsuitable for running offline evolutions #425

Open
asazernik opened this issue Dec 20, 2017 · 0 comments
Open

DefaultSlickApi is unsuitable for running offline evolutions #425

asazernik opened this issue Dec 20, 2017 · 0 comments

Comments

@asazernik
Copy link

NB: Offline evolutions are those without a running application.

Currently DefaultSlickApi has two dependencies that are hard to satisfy in a non-application context: environment: Environment and lifecycle: ApplicationLifecycle.

environment is a bogus dependency; it is unused, and should be dropped.

lifecycle implements behavior that is pretty easy to ignore if there's no lifecycle - just don't add the stop hooks. This dependency should either be made into a Option[ApplicationLifecycle] (don't know if that's doable with generic javax.inject) for both DefaultSlickApi and DatabaseConfigFactory; or, DefaultSlickApi/DatabaseConfigFactory should extend an OfflineSlickApi does the same thing but without the stop hook. In this case, the user would need some other way to initiate a shutdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants