[Bug]: Helm chart v1.0.1 can't automatically upgrade Planka 1.x to 2.x #712

Open
opened 2026-02-04 21:04:01 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @Kaurin on GitHub (May 23, 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

I have bumped my helm chart from 0.2.x to 1.0.1 and this is the error I get from the planka pod:

/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/init.js:14:5
Node.js v18.20.8

Desired behavior

Migrations happen automatically

Steps to reproduce

  1. Have the 0.2.25 helm chart installed and working
  2. Bump the helm chart to 1.0.0 or 1.0.1
  3. Observe the error in the planka pod

Other information

values.yaml :


replicaCount: 1
existingSecretkeySecret: "planka-secret"
existingAdminCredsSecret: "planka-admin-creds"
admin_email: my@mail.com
admin_name: MyName
baseUrl: "https://planka.kube.example.com"
serviceAccount:
  create: true
podSecurityContext:
  fsGroup: 65400
securityContext:
  capabilities:
    drop:
      - ALL
  readOnlyRootFilesystem: true
  runAsNonRoot: true
  runAsUser: 65400
service:
  annotations: {}
  type: ClusterIP
  port: 1337
  containerPort: 1337
ingress:
  enabled: false
resources:
  limits:
    cpu: 100m
    memory: 128Mi
  requests:
    cpu: 100m
    memory: 128Mi
autoscaling:
  enabled: false
postgresql:
  enabled: false
existingDburlSecret: "planka-database-app"
persistence:
  enabled: true
  storageClass: openebs-zfspv
  accessMode: ReadWriteOnce
  size: 10Gi
oidc:
  enabled: false
  clientId: ""
  clientSecret: ""
  existingSecret: ""
  issuerUrl: ""
  scopes: []
  admin:
    ignoreRoles: false
    rolesAttribute: groups
    roles:
      []
Originally created by @Kaurin on GitHub (May 23, 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 I have bumped my helm chart from 0.2.x to 1.0.1 and this is the error I get from the planka pod: ```plain /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/init.js:14:5 Node.js v18.20.8 ``` ### Desired behavior Migrations happen automatically ### Steps to reproduce 1. Have the 0.2.25 helm chart installed and working 2. Bump the helm chart to 1.0.0 or 1.0.1 3. Observe the error in the planka pod ### Other information `values.yaml` : ```yaml replicaCount: 1 existingSecretkeySecret: "planka-secret" existingAdminCredsSecret: "planka-admin-creds" admin_email: my@mail.com admin_name: MyName baseUrl: "https://planka.kube.example.com" serviceAccount: create: true podSecurityContext: fsGroup: 65400 securityContext: capabilities: drop: - ALL readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 65400 service: annotations: {} type: ClusterIP port: 1337 containerPort: 1337 ingress: enabled: false resources: limits: cpu: 100m memory: 128Mi requests: cpu: 100m memory: 128Mi autoscaling: enabled: false postgresql: enabled: false existingDburlSecret: "planka-database-app" persistence: enabled: true storageClass: openebs-zfspv accessMode: ReadWriteOnce size: 10Gi oidc: enabled: false clientId: "" clientSecret: "" existingSecret: "" issuerUrl: "" scopes: [] admin: ignoreRoles: false rolesAttribute: groups roles: [] ```
Author
Owner

@KOliver94 commented on GitHub (Jun 1, 2025):

It's possible to create a temporary pod for the migration but I agree that it should be documented. You can use something like:

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
@KOliver94 commented on GitHub (Jun 1, 2025): It's possible to create a temporary pod for the migration but I agree that it should be documented. You can use something like: ```bash 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 ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#712