mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-08 15:16:41 +00:00

* [NOD-326] Replaced UTXO table with TransactionOutput.IsSpent. * [NOD-326] Fixed merge errors.
19 lines
747 B
SQL
19 lines
747 B
SQL
CREATE TABLE `transaction_outputs`
|
|
(
|
|
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
`transaction_id` BIGINT UNSIGNED NOT NULL,
|
|
`index` INT UNSIGNED NOT NULL,
|
|
`value` BIGINT UNSIGNED NOT NULL,
|
|
`script_pub_key` BLOB NOT NULL,
|
|
`is_spent` TINYINT NOT NULL,
|
|
`address_id` BIGINT UNSIGNED NOT NULL,
|
|
PRIMARY KEY (`id`),
|
|
INDEX `idx_transaction_outputs_transaction_id` (`transaction_id`),
|
|
CONSTRAINT `fk_transaction_outputs_transaction_id`
|
|
FOREIGN KEY (`transaction_id`)
|
|
REFERENCES `transactions` (`id`),
|
|
CONSTRAINT `fk_transaction_outputs_address_id`
|
|
FOREIGN KEY (`address_id`)
|
|
REFERENCES `addresses` (`id`)
|
|
);
|