Skip to content

Commit

Permalink
feat: add retirements_tx_hash_key for easier query
Browse files Browse the repository at this point in the history
  • Loading branch information
blushi committed Oct 22, 2024
1 parent 2028c79 commit add03be
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions migrations/committed/000004.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
--! Previous: sha1:23379758e3a742625d5262c472693435196be95f
--! Hash: sha1:8aa6f840171d1c0076e70fbee8dd9b56f794a03d

ALTER TABLE retirements
DROP CONSTRAINT IF EXISTS retirements_tx_hash_key;

ALTER TABLE retirements
ADD CONSTRAINT retirements_tx_hash_key UNIQUE (tx_hash);
8 changes: 8 additions & 0 deletions migrations/schema_snapshot.sql
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,14 @@ ALTER TABLE ONLY public.retirements
ADD CONSTRAINT retirements_pkey PRIMARY KEY (chain_num, block_height, tx_idx, msg_idx);


--
-- Name: retirements retirements_tx_hash_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.retirements
ADD CONSTRAINT retirements_tx_hash_key UNIQUE (tx_hash);


--
-- Name: tx tx_hash_key; Type: CONSTRAINT; Schema: public; Owner: -
--
Expand Down

0 comments on commit add03be

Please sign in to comment.