Technically speaking, "repo_id" is redundant here since we get it for free in the unit_key. But it's not a problem, just mentioning it as an FYI.

I think we can skip the indexes on checksum and checksum type. The number of these metadata files should be small enough that the indexing operation will be dirt cheap, but from a purity of the model standpoint IMO they aren't needed.

The data_type index I can see keeping.