Skip to content

Commit 6caf8f3

Browse files
authored
fix: incorrectly used trigger (#1161)
1 parent cca2b17 commit 6caf8f3

File tree

1 file changed

+1
-1
lines changed
  • internal/storage/bucket/migrations/18-transactions-fill-inserted-at

1 file changed

+1
-1
lines changed

internal/storage/bucket/migrations/18-transactions-fill-inserted-at/up.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ do $$
1111
-- cannot disable triggers at session level on Azure Postgres with no superuser privileges.
1212
-- so we modify the trigger acting on transaction update to be triggered only if the metadata column is updated.
1313
-- by the way, it's a good move to not trigger the update_transaction_metadata_history function on every update if not necessary.
14-
for _ledger in select * from _system.ledgers where bucket = current_schema loop
14+
for _ledger in select * from _system.ledgers where bucket = current_schema and features->>'TRANSACTION_METADATA_HISTORY' = 'SYNC' loop
1515
_vsql = 'drop trigger if exists "update_transaction_metadata_history_' || _ledger.id || '" on "transactions"';
1616
execute _vsql;
1717

0 commit comments

Comments
 (0)