Add a foreign key on the transaction_inputs table to ensure that an output has been referenced only once.