Answer After upgrading to 1.4.0, the problem page, etc. encounters http 50x errors.

Viewed 252

console info:

2024-10-22 12:09:35.522 ERROR handler/handler.go:53 code: 500, reason: base.database_error, message: , error: pq: column "hot_score" does not exist

maybe the database table structure changed after upgraded? so...


badge/badge_event_rule.go:241 error getting badge by handler FirstPostEdit: pq: relation "badge" does not exist
2024-10-22 14:42:02.272 ERROR handler/handler.go:45 pq: relation "badge_group" does not exist

the database schema changed? how to Migrating data after version upgrade ?

2 Answers

./answer upgrade -C ./answer-data/ ok!

Database table structure will be changed automatically when upgraded. If you encounter some error when upgrading, try to fix it using the following command.

# enter container
docker exec -it answer bash

# upgrade from the low version to latest
answer upgrade -f v1.3.6 -C /data/

Powered by Answer - the open-source software that powers Q&A communities.
Made with love © 2024 Apache Answer Meta.