private static void createBuildVersionTableIfNotExists(final Configuration txnConfig) {
        // Need read committed so that once we have acquired the lock we can see changes
        // committed by other nodes, e.g. we want to see if another node has inserted the
        // new record.
        // Create a table that we can use to get a table lock on
        final String createTableSql = LogUtil.message("""
                        CREATE TABLE IF NOT EXISTS {} (
                            {} INT NOT NULL,
                            {} VARCHAR(255) NOT NULL,
                            {} VARCHAR(255) NOT NULL,
                            {} VARCHAR(10),
                            PRIMARY KEY (id)
                        ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci""",
                BUILD_VERSION_TABLE_NAME,
                ID_COL_NAME,
                BUILD_VERSION_COL_NAME,
                EXECUTING_NODE_COL_NAME,
                OUTCOME_COL_NAME);

        LOGGER.debug("Ensuring table {} exists", BUILD_VERSION_TABLE_NAME);
        // Causes implicit commit
        DSL.using(txnConfig)
                .execute(createTableSql);
    }
Use a table lock on a noddy table created just for this purpose to enforce
a cluster wide lock so we can do all the flyway migrations in isolation.
Flyway migrations should work under lock but we have lots of independent flyway
migrations so it is safer to do it this way.
Can't user the cluster lock service as that is not a thing at this point.
stroom-app/src/main/java/stroom/app/BootstrapUtil.java