pub async fn setup_database(config: &DatabaseConfig) -> Result<PgPool, Error>Expand description
Connect to the database and run migrations.
This function implements exponential backoff retry logic to handle startup race conditions when the database container is still initializing.
ยงErrors
Returns an error if the database connection cannot be established or migrations fail to run after exhausting retries.