@@ -326,9 +326,6 @@ CREATE INDEX IF NOT EXISTS block_rejection_signer_addrs_on_block_signature_hash
326
326
327
327
static CREATE_INDEXES_4 : & str = r#"
328
328
CREATE INDEX IF NOT EXISTS blocks_state ON blocks ((json_extract(block_info, '$.state')));
329
- "# ;
330
-
331
- static CREATE_INDEXES_5 : & str = r#"
332
329
CREATE INDEX IF NOT EXISTS blocks_signed_group ON blocks ((json_extract(block_info, '$.signed_group')));
333
330
"# ;
334
331
@@ -434,11 +431,6 @@ static SCHEMA_4: &[&str] = &[
434
431
"INSERT OR REPLACE INTO db_config (version) VALUES (4);" ,
435
432
] ;
436
433
437
- static SCHEMA_5 : & [ & str ] = & [
438
- CREATE_INDEXES_5 ,
439
- "INSERT OR REPLACE INTO db_config (version) VALUES (5);" ,
440
- ] ;
441
-
442
434
impl SignerDb {
443
435
/// The current schema version used in this build of the signer binary.
444
436
pub const SCHEMA_VERSION : u32 = 4 ;
@@ -527,20 +519,6 @@ impl SignerDb {
527
519
Ok ( ( ) )
528
520
}
529
521
530
- /// Migrate from schema 4 to schema 5
531
- fn schema_5_migration ( tx : & Transaction ) -> Result < ( ) , DBError > {
532
- if Self :: get_schema_version ( tx) ? >= 5 {
533
- // no migration necessary
534
- return Ok ( ( ) ) ;
535
- }
536
-
537
- for statement in SCHEMA_5 . iter ( ) {
538
- tx. execute_batch ( statement) ?;
539
- }
540
-
541
- Ok ( ( ) )
542
- }
543
-
544
522
/// Either instantiate a new database, or migrate an existing one
545
523
/// If the detected version of the existing database is 0 (i.e., a pre-migration
546
524
/// logic DB, the DB will be dropped).
@@ -553,8 +531,7 @@ impl SignerDb {
553
531
1 => Self :: schema_2_migration ( & sql_tx) ?,
554
532
2 => Self :: schema_3_migration ( & sql_tx) ?,
555
533
3 => Self :: schema_4_migration ( & sql_tx) ?,
556
- 4 => Self :: schema_5_migration ( & sql_tx) ?,
557
- 5 => break ,
534
+ 4 => break ,
558
535
x => return Err ( DBError :: Other ( format ! (
559
536
"Database schema is newer than supported by this binary. Expected version = {}, Database version = {x}" ,
560
537
Self :: SCHEMA_VERSION ,
0 commit comments