File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
mithril-aggregator/src/database
mithril-signer/src/database Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,20 @@ create table block_range_root (
70
70
merkle_root text not null,
71
71
primary key (start, end)
72
72
);
73
+ "# ,
74
+ ) ,
75
+ // Migration 6
76
+ // Add composite index on `block_number/transaction_hash` column of `cardano_tx` table
77
+ // Truncate `block_range_root` table after changing the order of retrieval of the transactions
78
+ SqlMigration :: new(
79
+ 6 ,
80
+ r#"
81
+ create index block_number_transaction_hash_index on cardano_tx(block_number, transaction_hash);
82
+
83
+ -- remove all data from the block_range_root table since the order used to create them has changed
84
+ delete from block_range_root;
85
+
86
+ vacuum;
73
87
"# ,
74
88
) ,
75
89
]
Original file line number Diff line number Diff line change @@ -70,6 +70,20 @@ create table block_range_root (
70
70
merkle_root text not null,
71
71
primary key (start, end)
72
72
);
73
+ "# ,
74
+ ) ,
75
+ // Migration 6
76
+ // Add composite index on `block_number/transaction_hash` column of `cardano_tx` table
77
+ // Truncate `block_range_root` table after changing the order of retrieval of the transactions
78
+ SqlMigration :: new(
79
+ 6 ,
80
+ r#"
81
+ create index block_number_transaction_hash_index on cardano_tx(block_number, transaction_hash);
82
+
83
+ -- remove all data from the block_range_root table since the order used to create them has changed
84
+ delete from block_range_root;
85
+
86
+ vacuum;
73
87
"# ,
74
88
) ,
75
89
]
You can’t perform that action at this time.
0 commit comments