@Provides
    @Singleton
    public T_CONN_PROV getConnectionProvider(
            final Provider<T_CONFIG> configProvider,
            final DataSourceFactory dataSourceFactory,
            @SuppressWarnings("unused") final ForceLegacyMigration forceLegacyMigration,
            final Injector injector) {

        LOGGER.debug(() -> "Getting connection provider for " + getModuleName());

        final DataSource dataSource = dataSourceFactory.create(
                configProvider.get(),
                getModuleName(),
                createUniquePool());

        final DurationTimer timer = DurationTimer.start();
        final boolean didMigration = performMigration(dataSource, injector);
        if (didMigration) {
            LOGGER.info("Performed migration for {} in {}", getModuleName(), timer);
        }

        return createConnectionProvider(dataSource);
    }
We inject {@link ForceLegacyMigration} to ensure that the core DB migration has happened before all
other migrations.
<p>
This provider means the FlyWay migration will be triggered on first use of a datasource.
stroom-db-util/src/main/java/stroom/db/util/AbstractDataSourceProviderModule.java