Consensus and bridge network status entries primary key
The bridge_network_status_entry and network_status_entry tables use as primary identifier the computed digest. This means that for any given consensus (or bridges statuses doc) an entry is created only if the relay (or bridge) has uploaded a new micro descriptor. If that isn't the case, no entry is created. @juga pointed this out to me a few days ago, and I had to go through my code and notes to remember that this was initially intentional behavior. In my initial reasoning there was no reason to create a new entry if the node had not created a new consensus.
If we do not create the entry in the DB, we should decide how we can determine which relays (or bridges) were effectively included in the document and how to record if a router has fallen out of the consensus.
I am now thinking maybe we should create instead a different table where we store the following data:
network_status_digest | network_status_entry_digest
This way we avoid duplicating all the information from the entry table but we manage to record all the entries for each consensus.