Created
August 2, 2018 07:49
-
-
Save RaghavSood/809dc79209ce094ad3cc0bb3bc23e498 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE "outpoints" ( "id" serial, "tx" text, "vout" int, "spentby" text, "spentindex" int, "value" bigint, "script" text, PRIMARY KEY ("id"), FOREIGN KEY ("tx") REFERENCES "public"."transactions"("txid") ON DELETE CASCADE ON UPDATE CASCADE, FOREIGN KEY ("spentby") REFERENCES "public"."transactions"("txid") ON DELETE CASCADE ON UPDATE CASCADE, FOREIGN KEY ("script") REFERENCES "public"."addresses"("script") ON DELETE CASCADE ON UPDATE CASCADE); CREATE INDEX "outpoints_tx_vout_idx" ON "public"."outpoints"("tx","vout"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment