mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-06 06:06:49 +00:00

* [NOD-303] Implement get transaction by id for api server * [NOD-303] Make routeParamTxID a constant * [NOD-303] Change database is not current error. * [NOD-303] Add ID to TransactionInput and TransactionOutput models * [NOD-303] Change transactions_outputs table name to transaction_outputs and transactions_inputs to transaction_inputs * [NOD-303] Add json annotations to transaction response types * [NOD-303] Split server package * [NOD-303] Add GetTransactionByHashHandler * [NOD-303] Add comments to exported functions and variables * [NOD-303] Put response types in a separate file * [NOD-303] Rename functions
19 lines
840 B
SQL
19 lines
840 B
SQL
CREATE TABLE `transaction_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`)
|
|
);
|