mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-11 06:37:21 +01:00
sqldb: fix dirty migration in v0.19.0-rc1
This commit is contained in:
@@ -198,3 +198,15 @@ func (s *PostgresStore) GetSchemaVersion() (int, bool, error) {
|
||||
|
||||
return version, dirty, nil
|
||||
}
|
||||
|
||||
// SetSchemaVersion sets the schema version of the Postgres database.
|
||||
//
|
||||
// NOTE: This alters the internal database schema tracker. USE WITH CAUTION!!!
|
||||
func (s *PostgresStore) SetSchemaVersion(version int, dirty bool) error {
|
||||
driver, err := pgx_migrate.WithInstance(s.DB, &pgx_migrate.Config{})
|
||||
if err != nil {
|
||||
return errPostgresMigration(err)
|
||||
}
|
||||
|
||||
return driver.SetVersion(version, dirty)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user