pub async fn validate_migrations<F, Fut>(
    db_prefix: &str,
    validate: F,
    decoders: ModuleDecoderRegistry
) -> Result<()>
where F: Fn(Database) -> Fut, Fut: Future<Output = Result<()>>,
Expand description

Iterates over all of the databases supplied in the database backup directory. First, a temporary database will be created and the contents will be populated from the database backup directory. Next, this function will execute the provided validate closure. The validate closure is expected to do any validation necessary on the temporary database, such as applying the appropriate database migrations and then reading all of the data to verify the migrations were successful.