pub async fn prepare_db_migration_snapshot<F>(
    snapshot_name: &str,
    prepare_fn: F,
    decoders: ModuleDecoderRegistry
) -> Result<()>
where F: for<'a> Fn(DatabaseTransaction<'a>) -> BoxFuture<'a, ()>,
Expand description

Creates the database backup directory by appending the snapshot_name to db/migrations. Then this function will execute the provided prepare_fn which is expected to populate the database with the appropriate data for testing a migration. If the snapshot directory already exists, this function will do nothing.