Improve error when DB migrations fail
- 主要言語
- Go
- スター
- 14.5k
- フォーク
- 1.5k
- 平均マージ
- 1日 20時間
- マージ済み PR(30日)
- 601
説明
When older `coder` executables encounter database schemas from newer builds that have newer migrations, they produce a somewhat inscrutable error that doesn't provide the user a meaningful call to action.
Current:
```
2024-08-12 17:51:10.327 [erro] connect to postgres failed ...
error= migrate up:
github.com/coder/coder/v2/cli.ConnectToPostgres
/home/runner/work/coder/coder/cli/server.go:2157
- up:
github.com/coder/coder/v2/coderd/database/migrations.UpWithFS
/home/runner/work/coder/coder/coderd/database/migrations/migrate.go:82
- no migration found for version 237: read down for version 237 .: file does not exist
```
Proposal:
```
2024-08-12 17:51:10.327 [erro] connect to postgres failed ...
error= Current database requires Coder version 2.14.0 or greater
```
コントリビューションガイド
評価
この issue はまだ評価されていません。