Skip to content

Commit

Permalink
fix: orders pk
Browse files Browse the repository at this point in the history
  • Loading branch information
blushi committed Nov 7, 2024
1 parent e3eb0cd commit 41cdbaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions migrations/committed/000005.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--! Previous: sha1:8aa6f840171d1c0076e70fbee8dd9b56f794a03d
--! Hash: sha1:b0be1153261a470d83023f509af01421f190ea79
--! Hash: sha1:fc876ad23b772a75c10056c5b7165585c454983d

DROP TABLE IF EXISTS orders;

Expand All @@ -19,7 +19,7 @@ CREATE TABLE orders (
tx_idx smallint NOT NULL,
msg_idx smallint NOT NULL,
tx_hash text NOT NULL,
PRIMARY KEY (chain_num, block_height, tx_idx, msg_idx)
PRIMARY KEY (chain_num, block_height, tx_idx, msg_idx, project_id, ask_denom)
);

DROP INDEX IF EXISTS orders_buyer_address_idx;
Expand Down
2 changes: 1 addition & 1 deletion migrations/schema_snapshot.sql
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ ALTER TABLE ONLY public.msg
--

ALTER TABLE ONLY public.orders
ADD CONSTRAINT orders_pkey PRIMARY KEY (chain_num, block_height, tx_idx, msg_idx);
ADD CONSTRAINT orders_pkey PRIMARY KEY (chain_num, block_height, tx_idx, msg_idx, project_id, ask_denom);


--
Expand Down

0 comments on commit 41cdbaa

Please sign in to comment.