mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
fix lost migrations (#3661)
This commit is contained in:
parent
0b2ce6f845
commit
a5f4c721bb
@ -156,6 +156,16 @@ func (m *Migrator) Apply(db kv.RwDB, datadir string) error {
|
||||
}
|
||||
|
||||
var applied map[string][]byte
|
||||
if err := db.View(context.Background(), func(tx kv.Tx) error {
|
||||
var err error
|
||||
applied, err = AppliedMigrations(tx, false)
|
||||
if err != nil {
|
||||
return fmt.Errorf("reading applied migrations: %w", err)
|
||||
}
|
||||
return nil
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := m.VerifyVersion(db); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user