When starting Coder, you might receive the following error. The version in the error will depend on values stored in your current Coder database.
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
This error indicates the Coder database schema has been upgraded by a more recent version of Coder. Once the schema has been updated, older Coder binaries can not be used to start the Coder server using that data. Using a version of Coder that is schema-compatible with the schema printed out in the error message with resolve the issue and enable the node to start.
As schema downgrades are not supported, should you absolutely need to revert to an earlier version of Coder, you will likely have to wipe your backend data. However, if you are a customer and accidentally upgraded your production Coder database, please file a support ticket for guidance.