- UNIQUE KEY `mux_id` (`mux_id`),
- UNIQUE KEY `tx_hash` (`tx_hash`),
- UNIQUE KEY `raw_transaction` (`raw_transaction`),
- UNIQUE KEY `blockhash_txidx` (`block_hash`,`tx_index`),
- UNIQUE KEY `blockheight_txidx` (`chain_id`,`block_height`,`tx_index`),
- CONSTRAINT `transactions_ibfk_1` FOREIGN KEY (`chain_id`) REFERENCES `chains` (`id`)
+ UNIQUE KEY `source_mux_id` (`chain_id`,`source_mux_id`),
+ UNIQUE KEY `source_tx_hash` (`chain_id`,`source_tx_hash`),
+ UNIQUE KEY `source_raw_transaction` (`source_raw_transaction`),
+ UNIQUE KEY `source_blockhash_txidx` (`chain_id`,`source_block_hash`,`tx_index`),
+ UNIQUE KEY `source_blockheight_txidx` (`chain_id`,`source_block_height`,`tx_index`),
+ UNIQUE KEY `dest_tx_hash` (`chain_id`,`dest_tx_hash`),
+ UNIQUE KEY `dest_blockhash_txidx` (`chain_id`,`dest_block_hash`,`tx_index`),
+ UNIQUE KEY `dest_blockheight_txidx` (`chain_id`,`dest_block_height`,`tx_index`),
+ CONSTRAINT `cross_transactions_ibfk_1` FOREIGN KEY (`chain_id`) REFERENCES `chains` (`id`)