kaspad/apiserver/migrations/000010_create_utxos_table.up.sql
Ori Newman 7fc2430ab1 [NOD-304] Implement get transactions by address for api server (#395)
* [NOD-303] Implement get transactions by address for API server

* [NOD-304] Implement get transactions by address

* [NOD-304] Implement get transactions by address

* [NOD-304] Use structs for where if possible

* [NOD-304] Auto increment IDs

* [NOD-304] Make defaultGetTransactionsLimit constant

* [NOD-304] Delete db directory

* [NOD-304] change db var to query

* [NOD-304] Extract route handle function from addRoutes

* [NOD-304] Order transactions by ID

* [NOD-304] Add error for passing arrays to GET
2019-09-08 10:52:03 +03:00

11 lines
384 B
SQL

CREATE TABLE `utxos`
(
`transaction_output_id` BIGINT UNSIGNED NOT NULL,
`accepting_block_id` INT UNSIGNED NULL,
PRIMARY KEY (`transaction_output_id`),
INDEX `idx_utxos_accepting_block_id` (`accepting_block_id`),
CONSTRAINT `fk_utxos_transaction_output_id`
FOREIGN KEY (`transaction_output_id`)
REFERENCES `transaction_outputs` (`id`)
);