mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-25 07:22:31 +00:00

* [NOD-280] Create database for API server * [NOD-280] Rename public_key_script to pk_script * [NOD-280] Change indexes names * [NOD-280] Add accepting block to blocks and transactions table and remove accepting_blocks table * [NOD-280] Add readme * [NOD-280] Change VARCHAR(32) to CHAR(64) * [NOD-280] Rename location_in_block to index
19 lines
841 B
SQL
19 lines
841 B
SQL
CREATE TABLE `transactions_inputs`
|
|
(
|
|
`id` BIGINT UNSIGNED NOT NULL,
|
|
`transaction_id` BIGINT UNSIGNED NULL,
|
|
`transaction_output_id` BIGINT UNSIGNED NOT NULL,
|
|
`index` INT UNSIGNED NOT NULL,
|
|
`signature_script` BLOB NOT NULL,
|
|
`sequence` BIGINT UNSIGNED NOT NULL,
|
|
PRIMARY KEY (`id`),
|
|
INDEX `idx_transactions_inputs_transaction_id` (`transaction_id`),
|
|
INDEX `idx_transactions_inputs_transaction_output_id` (`transaction_output_id`),
|
|
CONSTRAINT `fk_transactions_inputs_transaction_id`
|
|
FOREIGN KEY (`transaction_id`)
|
|
REFERENCES `transactions` (`id`),
|
|
CONSTRAINT `fk_transactions_inputs_transaction_output_id`
|
|
FOREIGN KEY (`transaction_output_id`)
|
|
REFERENCES `transactions_outputs` (`id`)
|
|
);
|