storagenode/storagenodedb: Improve preflight schema error message (#3844)

This commit is contained in:
Stefan Benten 2020-04-03 11:20:24 +02:00 committed by GitHub
parent b3939bc1ba
commit 0a4d253990
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -292,7 +292,7 @@ func (db *DB) Preflight(ctx context.Context) (err error) {
// Preflight stage 1: test schema correctness
schema, err := sqliteutil.QuerySchema(ctx, nextDB)
if err != nil {
return ErrPreflight.Wrap(err)
return ErrPreflight.New("%s: schema check failed: %v", dbName, err)
}
// we don't care about changes in versions table
schema.DropTable("versions")