Skip to content

Commit

Permalink
Fix executed migrations failure at startup (#1382)
Browse files Browse the repository at this point in the history
  • Loading branch information
rakanalh authored Oct 28, 2024
1 parent 8cd4668 commit fc1ade9
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ impl<'a> LedgerDBMigrator<'a> {

let ledger_db =
LedgerDB::with_config(&RocksdbConfig::new(self.ledger_path, max_open_files))?;
let executed_migrations = ledger_db.get_executed_migrations()?;

// Return an empty vector for executed migrations in case of an error since the iteration fails
// because of the absence of the table.
let executed_migrations = ledger_db.get_executed_migrations().unwrap_or(vec![]);

// Drop the lock file
drop(ledger_db);

Expand Down

0 comments on commit fc1ade9

Please sign in to comment.