private Optional<Version> getVersionFromPresenceOfFdTable(final Connection connection) {
        Optional<Version> optVersion = Optional.empty();
        try {
            try (final Statement statement = connection.createStatement()) {
                try (final ResultSet resultSet = statement.executeQuery("""
                        SELECT ID
                        FROM FD
                        LIMIT 1""")) {
                    if (resultSet.next()) {
                        final Version version = new Version(2, 0, 0);
                        LOGGER.info("Found FD table so version is: " + version);
                        optVersion = Optional.of(version);
                    }
                }
            }
        } catch (final SQLException e) {
            LOGGER.debug(e.getMessage(), e);
            // Ignore.
        }
        return optVersion;
    }
Configures anything related to persistence, e.g. transaction management, the
entity manager factory, data sources.
<p>
This does not extend {@link stroom.db.util.AbstractDataSourceProviderModule} as the core migrations
are special and need to happen first before all the other migrations. {@link ForceLegacyMigration} is
used to achieve this by making all other datasource providers depend on {@link ForceLegacyMigration}.
stroom-legacy/stroom-legacy-db-migration/src/main/java/stroom/legacy/db/LegacyDbModule.java