Under the SHA-256 hashing algorithm, it is currently impossible to compromise hashes.
There is no "filing" invalid hashes or "assigning" hashes to files they don't belong to. A hash either matches or it doesn't. You're assumping a hash has some sort of relationship to files in the database. It doesn't.
This is the same way most online services check if you are the user you claim. They store your username and your password's hash. If it matches, then it's assumed you know your original password, without it ever storing your original password. If it doesn't match, then it doesn't really care what you typed, it didn't match.