Skip to content

Commit fae5e7c

Browse files
Mateusz Czeladkaclaude
authored andcommitted
fix: simplify Flyway migration for address_utxo index creation
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 <noreply@anthropic.com>
1 parent 3c6b076 commit fae5e7c

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed
Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1 @@
1-
DO $$
2-
BEGIN
3-
IF NOT EXISTS (
4-
SELECT 1 FROM pg_indexes
5-
WHERE indexname = 'idx_address_utxo_tx_hash'
6-
AND tablename = 'address_utxo'
7-
AND schemaname = current_schema()
8-
) THEN
9-
CREATE INDEX idx_address_utxo_tx_hash ON address_utxo USING btree (tx_hash);
10-
END IF;
11-
END $$;
1+
CREATE INDEX idx_address_utxo_tx_hash ON address_utxo USING btree (tx_hash);

0 commit comments

Comments
 (0)