Skip to content

DefaultSlickApi is unsuitable for running offline evolutions #425

Description

@asazernik

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions