From 41cdbaa9138a1429e31caf76dd783a2517b37346 Mon Sep 17 00:00:00 2001 From: blushi Date: Thu, 7 Nov 2024 14:01:03 +0100 Subject: [PATCH] fix: orders pk --- migrations/committed/000005.sql | 4 ++-- migrations/schema_snapshot.sql | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/migrations/committed/000005.sql b/migrations/committed/000005.sql index 80188b9..3f1c216 100644 --- a/migrations/committed/000005.sql +++ b/migrations/committed/000005.sql @@ -1,5 +1,5 @@ --! Previous: sha1:8aa6f840171d1c0076e70fbee8dd9b56f794a03d ---! Hash: sha1:b0be1153261a470d83023f509af01421f190ea79 +--! Hash: sha1:fc876ad23b772a75c10056c5b7165585c454983d DROP TABLE IF EXISTS orders; @@ -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; diff --git a/migrations/schema_snapshot.sql b/migrations/schema_snapshot.sql index a634801..3849842 100644 --- a/migrations/schema_snapshot.sql +++ b/migrations/schema_snapshot.sql @@ -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); --