Skip to content

Commit f3b4e8b

Browse files
jpraynaudAlenar
authored andcommitted
fix: reset Cardano transactions store with a migration
This will avoid data inconsistency with nodes running previous unstable versions.
1 parent ebb4030 commit f3b4e8b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

internal/mithril-persistence/src/database/cardano_transaction_migration.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,17 @@ vacuum;
106106
r#"
107107
drop index cardano_tx_immutable_file_number_index;
108108
alter table cardano_tx drop column immutable_file_number;
109+
"#,
110+
),
111+
// Migration 9
112+
// Truncate Cardano transaction related tables to avoid data inconsistency
113+
// with previous versions of the nodes.
114+
SqlMigration::new(
115+
9,
116+
r#"
117+
delete from cardano_tx;
118+
delete from block_range_root;
119+
vacuum;
109120
"#,
110121
),
111122
]

0 commit comments

Comments
 (0)