From 991cdfe806688d0a5ddd2d56b44229b92cb27eaa Mon Sep 17 00:00:00 2001 From: Mateusz Czeladka Date: Wed, 29 Oct 2025 14:54:20 +0100 Subject: [PATCH] fix: simplify Flyway migration for address_utxo index creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove conditional check for index existence in migration script. Flyway handles migration idempotency, so the explicit IF NOT EXISTS check is unnecessary and can be simplified to a direct CREATE INDEX. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../V1.0_900_0__rosetta_app_addres_utxo.sql | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/yaci-indexer/src/main/resources/db/store/postgresql/V1.0_900_0__rosetta_app_addres_utxo.sql b/yaci-indexer/src/main/resources/db/store/postgresql/V1.0_900_0__rosetta_app_addres_utxo.sql index 05bfb309f..8ffd8c463 100644 --- a/yaci-indexer/src/main/resources/db/store/postgresql/V1.0_900_0__rosetta_app_addres_utxo.sql +++ b/yaci-indexer/src/main/resources/db/store/postgresql/V1.0_900_0__rosetta_app_addres_utxo.sql @@ -1,11 +1 @@ -DO $$ -BEGIN - IF NOT EXISTS ( - SELECT 1 FROM pg_indexes - WHERE indexname = 'idx_address_utxo_tx_hash' - AND tablename = 'address_utxo' - AND schemaname = current_schema() - ) THEN - CREATE INDEX idx_address_utxo_tx_hash ON address_utxo USING btree (tx_hash); - END IF; -END $$; \ No newline at end of file +CREATE INDEX idx_address_utxo_tx_hash ON address_utxo USING btree (tx_hash); \ No newline at end of file