[Bug]: Failed to upgrade from v1.26.2 to v2.0.0-rc.2 #698

Closed
opened 2026-02-04 21:00:17 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @mzch on GitHub (May 10, 2025).

Where is the problem occurring?

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

What browsers are you seeing the problem on?

No response

Current behavior

I'm running Planka v1.26.2 and today I tried to upgrade it to v2.0.0-rc.2.
When running npm run server:db:migrate,

+ npm run server:db:migrate

> planka@2.0.0-rc.2 server:db:migrate
> npm run db:migrate --prefix server


> db:migrate
> knex migrate:latest --cwd db

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
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 (/srv/planka/planka/server/node_modules/knex/lib/migrations/migrate/Migrator.js:567:11)
    at Migrator.latest (/srv/planka/planka/server/node_modules/knex/lib/migrations/migrate/Migrator.js:69:7)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Command.<anonymous> (/srv/planka/planka/server/node_modules/knex/bin/cli.js:250:32)

Desired behavior

Finished correctly.

Steps to reproduce

Run below:

npm install
npm run server:db:migrate

Other information

No response

Originally created by @mzch on GitHub (May 10, 2025). ### Where is the problem occurring? I encountered the problem while interacting with the server (Backend) ### What browsers are you seeing the problem on? _No response_ ### Current behavior I'm running Planka v1.26.2 and today I tried to upgrade it to v2.0.0-rc.2. When running `npm run server:db:migrate`, ```sh + npm run server:db:migrate > planka@2.0.0-rc.2 server:db:migrate > npm run db:migrate --prefix server > db:migrate > knex migrate:latest --cwd db 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 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 (/srv/planka/planka/server/node_modules/knex/lib/migrations/migrate/Migrator.js:567:11) at Migrator.latest (/srv/planka/planka/server/node_modules/knex/lib/migrations/migrate/Migrator.js:69:7) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async Command.<anonymous> (/srv/planka/planka/server/node_modules/knex/bin/cli.js:250:32) ``` ### Desired behavior Finished correctly. ### Steps to reproduce Run below: ```sh npm install npm run server:db:migrate ``` ### Other information _No response_
Author
Owner

@meltyshev commented on GitHub (May 10, 2025):

Hi! Upgrading to v2 requires a bit more actions than a typical update:

  • First, please check upgrade to v2 section in the docs.
  • Make sure you have a proper backup of all your data.
  • Instead of running npm run server:db:migrate, please run npm run server:db:upgrade - this will migrate the database and adapt all necessary files.
  • Finally, try starting PLANKA again and verify that everything was migrated successfully.
@meltyshev commented on GitHub (May 10, 2025): Hi! Upgrading to v2 requires a bit more actions than a typical update: - First, please check [upgrade to v2 section](https://docs.planka.cloud/docs/category/upgrade-to-v2) in the docs. - **Make sure you have a proper backup of all your data.** - Instead of running `npm run server:db:migrate`, please run `npm run server:db:upgrade` - this will migrate the database and adapt all necessary files. - Finally, try starting PLANKA again and verify that everything was migrated successfully.
Author
Owner

@mzch commented on GitHub (May 10, 2025):

Oh, it's all in my head. Thanks! @meltyshev

@mzch commented on GitHub (May 10, 2025): Oh, it's all in my head. Thanks! @meltyshev
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#698