[Bug]: Cannot install #854

Open
opened 2026-02-04 21:29:28 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @daniebker on GitHub (Nov 4, 2025).

Where is the problem occurring?

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

What browsers are you seeing the problem on?

Other

Current behavior

Following the instructions in the production docs

I get the following issue:

docker compose run --rm planka npm run db:create-admin-user

[+] Creating 1/0
 ✔ Container planka-postgres-1  Created                                                                                                                                                                                                    0.0s
[+] Running 1/1
 ✔ Container planka-postgres-1  Started                                                                                                                                                                                                    0.2s

> db:create-admin-user
> node db/create-admin-user.js

/app/node_modules/knex/lib/migrations/migrate/Migrator.js:567
    throw new Error(
          ^

Error: The migration directory is corrupt, the following files are missing: 20180721020022_create_next_id_function.js, 20180721021044_create_archive_table.js, 20180721220409_create_user_account_table.js, 20180721233450_create_project_table.js, 20180721234154_create_project_manager_table.js, 20180722000627_create_board_table.js, 20180722001747_create_board_membership_table.js, 20180722003437_create_label_table.js, 20180722003502_create_list_table.js, 20180722003614_create_card_table.js, 20180722005122_create_card_subscription_table.js, 20180722005359_create_card_membership_table.js, 20180722005928_create_card_label_table.js, 20180722006570_create_task_table.js, 20180722006688_create_attachment_table.js, 20181024220134_create_action_table.js, 20181112104653_create_notification_table.js, 20220523131229_add_image_to_attachment_table.js, 20220713145452_add_position_to_task_table.js, 20220725150723_add_language_to_user_account_table.js, 20220729142434_add_index_on_type_to_action_table.js, 20220803221221_add_password_changed_at_to_user_account_table.js, 20220815155645_add_permissions_to_board_membership_table.js, 20220906094517_create_session_table.js, 20221003140000_@.js, 20221223131625_preserve_original_format_of_images.js, 20221225224651_remove_board_types.js.js, 20221226210239_improve_quality_of_resized_images.js, 20230108213138_labels_reordering.js, 20230227170557_rename_timer_to_stopwatch.js, 20230809022050_oidc_with_pkce_flow.js, 20240721171239_languages_with_country_codes.js, 20240812065305_make_due_date_toggleable.js, 20240831195806_additional_http_only_token_for_enhanced_security_in_browsers.js, 20250131202710_add_list_color.js
    at validateMigrationList (/app/node_modules/knex/lib/migrations/migrate/Migrator.js:567:11)
    at Migrator.latest (/app/node_modules/knex/lib/migrations/migrate/Migrator.js:69:7)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /app/db/create-admin-user.js:48:5

Node.js v18.20.8

Desired behavior

running docker compose run --rm planka npm run db:create-admin-user should bootstrap the database with the admin user.

Steps to reproduce

Follow the steps in the production docs

Other information

I’m running docker in a ubuntu server. I have other applications working fine.

Originally created by @daniebker on GitHub (Nov 4, 2025). ### Where is the problem occurring? I encountered the problem while interacting with the server (Backend) ### What browsers are you seeing the problem on? Other ### Current behavior Following the instructions [in the production docs](https://docs.planka.cloud/docs/installation/docker/production-version) I get the following issue: ```sh docker compose run --rm planka npm run db:create-admin-user [+] Creating 1/0 ✔ Container planka-postgres-1 Created 0.0s [+] Running 1/1 ✔ Container planka-postgres-1 Started 0.2s > db:create-admin-user > node db/create-admin-user.js /app/node_modules/knex/lib/migrations/migrate/Migrator.js:567 throw new Error( ^ Error: The migration directory is corrupt, the following files are missing: 20180721020022_create_next_id_function.js, 20180721021044_create_archive_table.js, 20180721220409_create_user_account_table.js, 20180721233450_create_project_table.js, 20180721234154_create_project_manager_table.js, 20180722000627_create_board_table.js, 20180722001747_create_board_membership_table.js, 20180722003437_create_label_table.js, 20180722003502_create_list_table.js, 20180722003614_create_card_table.js, 20180722005122_create_card_subscription_table.js, 20180722005359_create_card_membership_table.js, 20180722005928_create_card_label_table.js, 20180722006570_create_task_table.js, 20180722006688_create_attachment_table.js, 20181024220134_create_action_table.js, 20181112104653_create_notification_table.js, 20220523131229_add_image_to_attachment_table.js, 20220713145452_add_position_to_task_table.js, 20220725150723_add_language_to_user_account_table.js, 20220729142434_add_index_on_type_to_action_table.js, 20220803221221_add_password_changed_at_to_user_account_table.js, 20220815155645_add_permissions_to_board_membership_table.js, 20220906094517_create_session_table.js, 20221003140000_@.js, 20221223131625_preserve_original_format_of_images.js, 20221225224651_remove_board_types.js.js, 20221226210239_improve_quality_of_resized_images.js, 20230108213138_labels_reordering.js, 20230227170557_rename_timer_to_stopwatch.js, 20230809022050_oidc_with_pkce_flow.js, 20240721171239_languages_with_country_codes.js, 20240812065305_make_due_date_toggleable.js, 20240831195806_additional_http_only_token_for_enhanced_security_in_browsers.js, 20250131202710_add_list_color.js at validateMigrationList (/app/node_modules/knex/lib/migrations/migrate/Migrator.js:567:11) at Migrator.latest (/app/node_modules/knex/lib/migrations/migrate/Migrator.js:69:7) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /app/db/create-admin-user.js:48:5 Node.js v18.20.8 ``` ### Desired behavior running `docker compose run --rm planka npm run db:create-admin-user` should bootstrap the database with the admin user. ### Steps to reproduce Follow the steps in [the production docs](https://docs.planka.cloud/docs/installation/docker/production-version) ### Other information I’m running docker in a ubuntu server. I have other applications working fine.
Author
Owner

@jansenfuller commented on GitHub (Jan 14, 2026):

I am having this issue as well but on k3s. Deployed using the k3s Helm controller with the following configuration. I was moving from a previous deployment on a docker container in Ubuntu VM on Proxmox. DB was on a Proxmox LXC running Alpine Linux.

apiVersion: v1
kind: Namespace
metadata:
  name:  planka
---
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
  name: planka
  namespace: planka
spec:
  repo: http://plankanban.github.io/planka
  chart: planka
  targetNamespace: planka
  valuesContent: |-
    secretKey: "XXXXX"

    admin_email: "XXXXX"
    admin_password: "XXXXX"
    admin_name: "Admin Planka"
    admin_username: "admin"

    ingress:
      enabled: true
      hosts:
        - host: board.062625.xyz
          paths:
            - path: /
              pathType: ImplementationSpecific

    postgresql:
      enabled: false

    dburl: "postgresql://planka:XXXXX@postgres.ff.home:9100/planka"

    oidc:
      enabled: true
      clientId: "XXXXX"
      clientSecret: "XXXXX"
      issuerUrl: "XXXXX"
      admin:
        roles:
          - planka-admin

Here is the coresponding output

│ /app/node_modules/knex/lib/migrations/migrate/Migrator.js:567                                                                            │
│     throw new Error(                                                                                                                     │
│           ^                                                                                                                              │
│                                                                                                                                          │
│ Error: The migration directory is corrupt, the following files are missing: 20180721020022_create_next_id_function.js, 20180721021044_cr │
│ eate_archive_table.js, 20180721220409_create_user_account_table.js, 20180721233450_create_project_table.js, 20180721234154_create_projec │
│ t_manager_table.js, 20180722000627_create_board_table.js, 20180722001747_create_board_membership_table.js, 20180722003437_create_label_t │
│ able.js, 20180722003502_create_list_table.js, 20180722003614_create_card_table.js, 20180722005122_create_card_subscription_table.js, 201 │
│ 80722005359_create_card_membership_table.js, 20180722005928_create_card_label_table.js, 20180722006570_create_task_table.js, 20180722006 │
│ 688_create_attachment_table.js, 20181024220134_create_action_table.js, 20181112104653_create_notification_table.js, 20220523131229_add_i │
│ mage_to_attachment_table.js, 20220713145452_add_position_to_task_table.js, 20220725150723_add_language_to_user_account_table.js, 2022072 │
│ 9142434_add_index_on_type_to_action_table.js, 20220803221221_add_password_changed_at_to_user_account_table.js, 20220815155645_add_permis │
│ sions_to_board_membership_table.js, 20220906094517_create_session_table.js, 20221003140000_@.js, 20221223131625_preserve_original_format │
│ _of_images.js, 20221225224651_remove_board_types.js.js, 20221226210239_improve_quality_of_resized_images.js, 20230108213138_labels_reord │
│ ering.js, 20230227170557_rename_timer_to_stopwatch.js, 20230809022050_oidc_with_pkce_flow.js, 20240721171239_languages_with_country_code │
│ s.js, 20240812065305_make_due_date_toggleable.js, 20240831195806_additional_http_only_token_for_enhanced_security_in_browsers.js, 202501 │
│ 31202710_add_list_color.js                                                                                                               │
│     at validateMigrationList (/app/node_modules/knex/lib/migrations/migrate/Migrator.js:567:11)                                          │
│     at Migrator.latest (/app/node_modules/knex/lib/migrations/migrate/Migrator.js:69:7)                                                  │
│     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)                                                        │
│     at async /app/db/init.js:14:5                                                                                                        │
│                                                                                                                                          │
│ Node.js v18.20.8                                                                                                                         │
│ stream closed: EOF for planka/planka-756d777789-ksc58 (planka)
@jansenfuller commented on GitHub (Jan 14, 2026): I am having this issue as well but on k3s. Deployed using the k3s Helm controller with the following configuration. I was moving from a previous deployment on a docker container in Ubuntu VM on Proxmox. DB was on a Proxmox LXC running Alpine Linux. ``` apiVersion: v1 kind: Namespace metadata: name: planka --- apiVersion: helm.cattle.io/v1 kind: HelmChart metadata: name: planka namespace: planka spec: repo: http://plankanban.github.io/planka chart: planka targetNamespace: planka valuesContent: |- secretKey: "XXXXX" admin_email: "XXXXX" admin_password: "XXXXX" admin_name: "Admin Planka" admin_username: "admin" ingress: enabled: true hosts: - host: board.062625.xyz paths: - path: / pathType: ImplementationSpecific postgresql: enabled: false dburl: "postgresql://planka:XXXXX@postgres.ff.home:9100/planka" oidc: enabled: true clientId: "XXXXX" clientSecret: "XXXXX" issuerUrl: "XXXXX" admin: roles: - planka-admin ``` Here is the coresponding output ``` │ /app/node_modules/knex/lib/migrations/migrate/Migrator.js:567 │ │ throw new Error( │ │ ^ │ │ │ │ Error: The migration directory is corrupt, the following files are missing: 20180721020022_create_next_id_function.js, 20180721021044_cr │ │ eate_archive_table.js, 20180721220409_create_user_account_table.js, 20180721233450_create_project_table.js, 20180721234154_create_projec │ │ t_manager_table.js, 20180722000627_create_board_table.js, 20180722001747_create_board_membership_table.js, 20180722003437_create_label_t │ │ able.js, 20180722003502_create_list_table.js, 20180722003614_create_card_table.js, 20180722005122_create_card_subscription_table.js, 201 │ │ 80722005359_create_card_membership_table.js, 20180722005928_create_card_label_table.js, 20180722006570_create_task_table.js, 20180722006 │ │ 688_create_attachment_table.js, 20181024220134_create_action_table.js, 20181112104653_create_notification_table.js, 20220523131229_add_i │ │ mage_to_attachment_table.js, 20220713145452_add_position_to_task_table.js, 20220725150723_add_language_to_user_account_table.js, 2022072 │ │ 9142434_add_index_on_type_to_action_table.js, 20220803221221_add_password_changed_at_to_user_account_table.js, 20220815155645_add_permis │ │ sions_to_board_membership_table.js, 20220906094517_create_session_table.js, 20221003140000_@.js, 20221223131625_preserve_original_format │ │ _of_images.js, 20221225224651_remove_board_types.js.js, 20221226210239_improve_quality_of_resized_images.js, 20230108213138_labels_reord │ │ ering.js, 20230227170557_rename_timer_to_stopwatch.js, 20230809022050_oidc_with_pkce_flow.js, 20240721171239_languages_with_country_code │ │ s.js, 20240812065305_make_due_date_toggleable.js, 20240831195806_additional_http_only_token_for_enhanced_security_in_browsers.js, 202501 │ │ 31202710_add_list_color.js │ │ at validateMigrationList (/app/node_modules/knex/lib/migrations/migrate/Migrator.js:567:11) │ │ at Migrator.latest (/app/node_modules/knex/lib/migrations/migrate/Migrator.js:69:7) │ │ at process.processTicksAndRejections (node:internal/process/task_queues:95:5) │ │ at async /app/db/init.js:14:5 │ │ │ │ Node.js v18.20.8 │ │ stream closed: EOF for planka/planka-756d777789-ksc58 (planka) ```
Author
Owner

@meltyshev commented on GitHub (Jan 14, 2026):

Hey! This error means the database was already initialized with v1, but v2 uses a different set of migration files - because of that, the app can't find the migrations that were already applied.

To upgrade the database, there's an upgrade script included that should resolve the migration issues and also update all existing data and files.

For a Docker-based installation, you can follow this guide: https://docs.planka.cloud/docs/upgrade-to-v2/docker/

I'm not very familiar with k3s, but this comment might be helpful: https://github.com/plankanban/planka/issues/1144#issuecomment-2926243544

UPD: please don't forget to make a full backup before running the upgrade script.

@meltyshev commented on GitHub (Jan 14, 2026): Hey! This error means the database was already initialized with v1, but v2 uses a different set of migration files - because of that, the app can't find the migrations that were already applied. To upgrade the database, there's an upgrade script included that should resolve the migration issues and also update all existing data and files. For a Docker-based installation, you can follow this guide: https://docs.planka.cloud/docs/upgrade-to-v2/docker/ I'm not very familiar with k3s, but this comment might be helpful: https://github.com/plankanban/planka/issues/1144#issuecomment-2926243544 UPD: please don't forget to make a full backup before running the upgrade script.
Author
Owner

@jansenfuller commented on GitHub (Jan 15, 2026):

I forgot to run a backup but that command from #1144 did the trick! I am up and running again. Thank you very much for your help.

For future reference the command is

kubectl run db-upgrade --image=ghcr.io/plankanban/planka:2.0.0-rc.3 --restart=Never --env=DATABASE_URL=postgresql://planka:password@planka-postgresql:5432/planka --namespace=planka --command -- npm run db:upgrade

and worked with k8s version 1.34.3+k3s1.

@jansenfuller commented on GitHub (Jan 15, 2026): I forgot to run a backup but that command from #1144 did the trick! I am up and running again. Thank you very much for your help. For future reference the command is ``` kubectl run db-upgrade --image=ghcr.io/plankanban/planka:2.0.0-rc.3 --restart=Never --env=DATABASE_URL=postgresql://planka:password@planka-postgresql:5432/planka --namespace=planka --command -- npm run db:upgrade ``` and worked with k8s version 1.34.3+k3s1.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#854