Skip to content

Commit 8931a0a

Browse files
committed
Add migrations to create index for block_number on aggregator and signer nodes
1 parent baf3e08 commit 8931a0a

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

mithril-aggregator/src/database/cardano_transaction_migration.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,13 @@ alter table cardano_tx add column block_hash text not null;
5151
vacuum;
5252
"#,
5353
),
54+
// Migration 4
55+
// Add index on `block_number` column of `cardano_tx` table
56+
SqlMigration::new(
57+
4,
58+
r#"
59+
create index block_number_index on cardano_tx(block_number);
60+
"#,
61+
),
5462
]
5563
}

mithril-signer/src/database/cardano_transaction_migration.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,13 @@ alter table cardano_tx add column block_hash text not null;
5151
vacuum;
5252
"#,
5353
),
54+
// Migration 4
55+
// Add index on `block_number` column of `cardano_tx` table
56+
SqlMigration::new(
57+
4,
58+
r#"
59+
create index block_number_index on cardano_tx(block_number);
60+
"#,
61+
),
5462
]
5563
}

0 commit comments

Comments
 (0)