diff --git a/crates/erc20_payment_lib_common/migrations/20240320000000_add_idx.sql b/crates/erc20_payment_lib_common/migrations/20240320000000_add_idx.sql index 6972ff29..67841b8b 100644 --- a/crates/erc20_payment_lib_common/migrations/20240320000000_add_idx.sql +++ b/crates/erc20_payment_lib_common/migrations/20240320000000_add_idx.sql @@ -1,4 +1,5 @@ -CREATE INDEX "idx_chain_tx_tx_hash" ON "chain_tx" ("tx_hash"); +DELETE FROM chain_tx; +CREATE UNIQUE INDEX "idx_chain_tx_tx_hash" ON "chain_tx" ("tx_hash"); CREATE INDEX "idx_chain_tx_blockchain_date" ON "chain_tx" ("blockchain_date"); CREATE INDEX "idx_chain_transfer_blockchain_date" ON "chain_transfer" ("blockchain_date"); CREATE INDEX "idx_chain_transfer_receiver_address" ON "chain_transfer" ("receiver_addr"); diff --git a/crates/erc20_payment_lib_common/migrations/20240320000001_add_idx.sql b/crates/erc20_payment_lib_common/migrations/20240320000001_add_idx.sql deleted file mode 100644 index 84bb17d9..00000000 --- a/crates/erc20_payment_lib_common/migrations/20240320000001_add_idx.sql +++ /dev/null @@ -1,2 +0,0 @@ -DROP INDEX "idx_chain_tx_tx_hash"; -CREATE UNIQUE INDEX "idx_chain_tx_tx_hash" ON "chain_tx" ("tx_hash");