**Description**
The documentation and the error message of the [check-migrations](https://airflow.apache.org/docs/apache-airflow/stable/cli-and-env-variables-ref.html#check-migrations) / `def check_migrations` could be more verbose.  This check can fail if the underlying database was never initialised.


**Use case / motivation**

We are deploying our airflow helm chart with terraform helm provider. This provider has a [bug](https://github.com/hashicorp/terraform-provider-helm/issues/683) with helm hook. If airflow would give us a bit more verbose error message why could the `check-migrations` fail, we would find the underlying error/bug much sooner.


**Are you willing to submit a PR?**
Yes



airflow/utils/db.py
"""
    Function to wait for all airflow migrations to complete.
    :param timeout: Timeout for the migration in seconds
    :return: None
    """
    from alembic.runtime.migration import MigrationContext
    from alembic.script import ScriptDirectory
    config = _get_alembic_config()
    script_ = ScriptDirectory.from_config(config)
    with settings.engine.connect() as connection:
        context = MigrationContext.configure(connection)
        ticker = 0
        while True:
            source_heads = set(script_.get_heads())
            db_heads = set(context.get_current_heads())
            if source_heads == db_heads:
                break
            if ticker >= timeout:
                raise TimeoutError(f"There are still unapplied migrations after {ticker} seconds.")
            ticker += 1
            time.sleep(1)
            log.info('Waiting for migrations... %s second(s)', ticker)
def check_conn_id_duplicates(session=None) -> str: