[Bug]: Database migration (comments_total does not exit) #758

Closed
opened 2026-02-04 21:14:43 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @grenagit on GitHub (Jul 8, 2025).

Where is the problem occurring?

I encountered the problem while interacting with the server (Backend)

What browsers are you seeing the problem on?

Firefox

Current behavior

I successfully migrated a planka manually installed on a Debian server (v1.26.2 > v2.0.0-rc.3).

While trying to open an array containing data, I get stuck on loading.

In journalctl, I can read Unexpected error from database adapter: column "comments_total" does not exist

Desired behavior

The migration 20250523131647_add_comments_counter.js does not seem to have taken place despite the execution of npm run db:upgrade...

In the database only the migration 20250228000022_version_2.js is done!

Steps to reproduce

Follow the steps in official documentation

Other information

No response

Originally created by @grenagit on GitHub (Jul 8, 2025). ### Where is the problem occurring? I encountered the problem while interacting with the server (Backend) ### What browsers are you seeing the problem on? Firefox ### Current behavior I successfully migrated a planka manually installed on a Debian server (v1.26.2 > v2.0.0-rc.3). While trying to open an array containing data, I get stuck on loading. In journalctl, I can read `Unexpected error from database adapter: column "comments_total" does not exist` ### Desired behavior The migration [20250523131647_add_comments_counter.js](https://github.com/plankanban/planka/blob/master/server/db/migrations/20250523131647_add_comments_counter.js) does not seem to have taken place despite the execution of `npm run db:upgrade`... In the database only the migration [20250228000022_version_2.js](https://github.com/plankanban/planka/blob/master/server/db/migra/20250228000022_version_2.js) is done! ### Steps to reproduce Follow the steps in [official documentation](https://docs.planka.cloud/docs/upgrade-to-v2/manual) ### Other information _No response_
Author
Owner

@meltyshev commented on GitHub (Jul 8, 2025):

Hi! The upgrade script only upgrades to the initial v2. However, we've since added more features and additional database migrations that need to be run. I believe the issue will be resolved if you run npm run db:migrate.

By the way, in the Docker setup we always run db:init before starting PLANKA to ensure migrations are applied first (this is handled in start.sh).

UPD: You're right - we missed that in the docs. We'll get them updated.

@meltyshev commented on GitHub (Jul 8, 2025): Hi! The upgrade script only upgrades to the initial v2. However, we've since added more features and additional database migrations that need to be run. I believe the issue will be resolved if you run `npm run db:migrate`. By the way, in the Docker setup we always run `db:init` before starting PLANKA to ensure migrations are applied first (this is handled in `start.sh`). UPD: You're right - we missed that in the docs. We'll get them updated.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#758