Skip to content

Instantly share code, notes, and snippets.

@RaghavSood
Created August 2, 2018 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RaghavSood/809dc79209ce094ad3cc0bb3bc23e498 to your computer and use it in GitHub Desktop.
Save RaghavSood/809dc79209ce094ad3cc0bb3bc23e498 to your computer and use it in GitHub Desktop.
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