Migration hangs when upgrading from v4 to v5

System Information
  • Strapi Version: 5.5.0
  • Operating System: MacOS Sonoma 14.1
  • Database: Postgres 14.12 (AWS RDS)
  • Node Version: v20.9.0
  • NPM Version: v10.1.0
  • Yarn Version: v1.22.22

I’m trying to upgrade from Strapi v4 to v5.
I’ve followed the online documenation, and used npx @strapi/upgrade major to make the migration.
then i manually fixed some code according to the docs.

following that - yarn build which worked ok.
and now - yarn develop - which hangs

you can see it starts a database migration process but it has lots of errors, and in the end it just hangs forever…

yarn develop
yarn run v1.22.22
$ strapi develop
✔ Cleaning dist dir (7ms)
⠙ Loading Strapi  strapi::database Found migrations to run +0ms
⠼ Loading Strapi  strapi::database::migration renaming index from files_documents_index to files_documents_idx +0ms
⠋ Loading Strapi  strapi::database::migration error creating index: {"length":119,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +451ms
  strapi::database::migration renaming index from upload_folders_documents_index to upload_folders_documents_idx +1ms
⠴ Loading Strapi  strapi::database::migration error creating index: {"length":128,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +443ms
  strapi::database::migration renaming index from i18n_locale_documents_index to i18n_locale_documents_idx +0ms
⠙ Loading Strapi  strapi::database::migration error creating index: {"length":125,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +443ms
  strapi::database::migration renaming index from strapi_releases_documents_index to strapi_releases_documents_idx +0ms
⠦ Loading Strapi  strapi::database::migration error creating index: {"length":129,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +441ms
  strapi::database::migration renaming index from strapi_release_actions_documents_index to strapi_release_actions_documents_idx +0ms
⠹ Loading Strapi  strapi::database::migration error creating index: {"length":136,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +450ms
  strapi::database::migration renaming index from strapi_workflows_documents_index to strapi_workflows_documents_idx +0ms
⠧ Loading Strapi  strapi::database::migration error creating index: {"length":130,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +456ms
  strapi::database::migration renaming index from strapi_workflows_stages_documents_index to strapi_workflows_stages_documents_idx +1ms
⠸ Loading Strapi  strapi::database::migration error creating index: {"length":137,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +453ms
  strapi::database::migration renaming index from up_permissions_documents_index to up_permissions_documents_idx +0ms
⠏ Loading Strapi  strapi::database::migration error creating index: {"length":128,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +450ms
  strapi::database::migration renaming index from up_roles_documents_index to up_roles_documents_idx +1ms
⠼ Loading Strapi  strapi::database::migration error creating index: {"length":122,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +453ms
  strapi::database::migration renaming index from up_users_documents_index to up_users_documents_idx +0ms
⠋ Loading Strapi  strapi::database::migration error creating index: {"length":122,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +448ms
  strapi::database::migration renaming index from articles_documents_index to articles_documents_idx +1ms
⠴ Loading Strapi  strapi::database::migration error creating index: {"length":122,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +452ms
  strapi::database::migration renaming index from article_categories_documents_index to article_categories_documents_idx +0ms
⠙ Loading Strapi  strapi::database::migration error creating index: {"length":132,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +450ms
  strapi::database::migration renaming index from search_categories_documents_index to search_categories_documents_idx +0ms
⠦ Loading Strapi  strapi::database::migration error creating index: {"length":131,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +443ms
  strapi::database::migration renaming index from social_accounts_documents_index to social_accounts_documents_idx +0ms
⠹ Loading Strapi  strapi::database::migration error creating index: {"length":129,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +447ms
  strapi::database::migration renaming index from social_cards_documents_index to social_cards_documents_idx +0ms
⠧ Loading Strapi  strapi::database::migration error creating index: {"length":126,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +454ms
  strapi::database::migration renaming index from websites_documents_index to websites_documents_idx +0ms
⠸ Loading Strapi  strapi::database::migration error creating index: {"length":122,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +448ms
  strapi::database::migration renaming index from admin_permissions_documents_index to admin_permissions_documents_idx +0ms
⠇ Loading Strapi  strapi::database::migration error creating index: {"length":131,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +451ms
  strapi::database::migration renaming index from admin_users_documents_index to admin_users_documents_idx +0ms
⠼ Loading Strapi  strapi::database::migration error creating index: {"length":125,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +451ms
  strapi::database::migration renaming index from admin_roles_documents_index to admin_roles_documents_idx +1ms
⠋ Loading Strapi  strapi::database::migration error creating index: {"length":125,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +455ms
  strapi::database::migration renaming index from strapi_api_tokens_documents_index to strapi_api_tokens_documents_idx +0ms
⠴ Loading Strapi  strapi::database::migration error creating index: {"length":131,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +448ms
  strapi::database::migration renaming index from strapi_api_token_permissions_documents_index to strapi_api_token_permissions_documents_idx +0ms
⠙ Loading Strapi  strapi::database::migration error creating index: {"length":142,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +445ms
  strapi::database::migration renaming index from strapi_transfer_tokens_documents_index to strapi_transfer_tokens_documents_idx +1ms
⠦ Loading Strapi  strapi::database::migration error creating index: {"length":136,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +451ms
  strapi::database::migration renaming index from strapi_transfer_token_permissions_documents_index to strapi_transfer_token_permissions_documents_idx +0ms
⠹ Loading Strapi  strapi::database::migration error creating index: {"length":147,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +451ms
  strapi::database::migration renaming index from files_related_mph_order_index to files_related_mph_oidx +0ms
⠧ Loading Strapi  strapi::database::migration error creating index: {"length":127,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +453ms
  strapi::database::migration renaming index from files_related_mph_id_column_index to files_related_mph_idix +1ms
⠸ Loading Strapi  strapi::database::migration error creating index: {"length":131,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +453ms
  strapi::database::migration renaming index from files_folder_lnk_unique to files_folder_lnk_uq +0ms
⠏ Loading Strapi  strapi::database::migration error creating index: {"length":121,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +450ms
  strapi::database::migration renaming index from upload_folders_parent_lnk_unique to upload_folders_parent_lnk_uq +1ms
⠼ Loading Strapi  strapi::database::migration error creating index: {"length":130,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +463ms
  strapi::database::migration renaming index from strapi_release_actions_release_lnk_unique to strapi_release_actions_release_lnk_uq +2ms
⠋ Loading Strapi  strapi::database::migration error creating index: {"length":139,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +445ms
  strapi::database::migration renaming index from strapi_workflows_stage_required_to_publish_lnk_unique to strapi_workflows_stage_required_to_publish_lnk_uq +0ms
⠴ Loading Strapi  strapi::database::migration error creating index: {"length":151,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +443ms
  strapi::database::migration renaming index from strapi_workflows_stages_workflow_lnk_unique to strapi_workflows_stages_workflow_lnk_uq +0ms
⠙ Loading Strapi  strapi::database::migration error creating index: {"length":141,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +441ms
  strapi::database::migration renaming index from strapi_workflows_stages_permissions_lnk_unique to strapi_workflows_stages_permissions_lnk_uq +0ms
⠦ Loading Strapi  strapi::database::migration error creating index: {"length":144,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +449ms
  strapi::database::migration renaming index from up_permissions_role_lnk_unique to up_permissions_role_lnk_uq +0ms
⠹ Loading Strapi  strapi::database::migration error creating index: {"length":128,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +449ms
  strapi::database::migration renaming index from up_users_role_lnk_unique to up_users_role_lnk_uq +0ms
⠧ Loading Strapi  strapi::database::migration error creating index: {"length":122,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +457ms
  strapi::database::migration renaming index from articles_websites_lnk_unique to articles_websites_lnk_uq +0ms
⠸ Loading Strapi  strapi::database::migration error creating index: {"length":126,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +445ms
  strapi::database::migration renaming index from articles_article_category_lnk_unique to articles_article_category_lnk_uq +0ms
⠇ Loading Strapi  strapi::database::migration error creating index: {"length":134,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +446ms
  strapi::database::migration renaming index from articles_parent_lnk_unique to articles_parent_lnk_uq +0ms
⠼ Loading Strapi  strapi::database::migration error creating index: {"length":124,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +452ms
  strapi::database::migration renaming index from articles_search_category_lnk_unique to articles_search_category_lnk_uq +0ms
⠏ Loading Strapi  strapi::database::migration error creating index: {"length":133,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +449ms
  strapi::database::migration renaming index from social_accounts_website_lnk_unique to social_accounts_website_lnk_uq +0ms
⠴ Loading Strapi  strapi::database::migration error creating index: {"length":132,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +465ms
  strapi::database::migration renaming index from social_cards_article_lnk_unique to social_cards_article_lnk_uq +0ms
⠙ Loading Strapi  strapi::database::migration error creating index: {"length":129,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +450ms
  strapi::database::migration renaming index from social_cards_account_published_lnk_unique to social_cards_account_published_lnk_uq +1ms
⠦ Loading Strapi  strapi::database::migration error creating index: {"length":139,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +447ms
  strapi::database::migration renaming index from admin_permissions_role_lnk_unique to admin_permissions_role_lnk_uq +0ms
⠹ Loading Strapi  strapi::database::migration error creating index: {"length":131,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +443ms
  strapi::database::migration renaming index from admin_users_roles_lnk_unique to admin_users_roles_lnk_uq +0ms
⠧ Loading Strapi  strapi::database::migration error creating index: {"length":126,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +450ms
  strapi::database::migration renaming index from strapi_api_token_permissions_token_lnk_unique to strapi_api_token_permissions_token_lnk_uq +1ms
⠸ Loading Strapi  strapi::database::migration error creating index: {"length":143,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +445ms
  strapi::database::migration renaming index from strapi_transfer_token_permissions_token_lnk_unique to strapi_transfer_token_permissions_token_lnk_uq +1ms
⠇ Loading Strapi  strapi::database::migration error creating index: {"length":148,"name":"error","severity":"ERROR","code":"42P01","file":"namespace.c","line":"439","routine":"RangeVarGetRelidExtended"} +445ms
⠸ Loading Strapi  strapi::database::migration renaming column file_order to file_ord +307ms
⠏ Loading Strapi  strapi::database::migration renaming column folder_order to folder_ord +450ms
⠼ Loading Strapi  strapi::database::migration renaming column release_action_order to release_action_ord +477ms
⠼ Loading Strapi  strapi::database::migration renaming column permission_order to permission_ord +758ms
⠋ Loading Strapi  strapi::database::migration renaming column user_order to user_ord +469ms
⠴ Loading Strapi  strapi::database::migration renaming column website_order to website_ord +457ms
⠙ Loading Strapi  strapi::database::migration renaming column article_order to article_ord +464ms
⠧ Loading Strapi  strapi::database::migration renaming column article_order to article_ord +458ms
⠹ Loading Strapi  strapi::database::migration renaming column article_order to article_ord +456ms
⠇ Loading Strapi  strapi::database::migration renaming column article_order to article_ord +460ms
⠸ Loading Strapi  strapi::database::migration renaming column social_account_order to social_account_ord +454ms
⠏ Loading Strapi  strapi::database::migration renaming column social_card_order to social_card_ord +449ms
⠴ Loading Strapi  strapi::database::migration renaming column social_card_order to social_card_ord +463ms
⠙ Loading Strapi  strapi::database::migration renaming column permission_order to permission_ord +477ms
⠧ Loading Strapi  strapi::database::migration renaming column role_order to role_ord +497ms
⠹ Loading Strapi  strapi::database::migration renaming column user_order to user_ord +465ms
⠇ Loading Strapi  strapi::database::migration renaming column api_token_permission_order to api_token_permission_ord +449ms
⠼ Loading Strapi  strapi::database::migration renaming column transfer_token_permission_order to transfer_token_permission_ord +473ms
⠧ Loading Strapi  strapi::database::migration renaming table files_related_morphs to files_related_mph +298ms
⠙ Loading Strapi  strapi::database::migration renaming table files_folder_links to files_folder_lnk +304ms
⠴ Loading Strapi  strapi::database::migration renaming table upload_folders_parent_links to upload_folders_parent_lnk +303ms
⠏ Loading Strapi  strapi::database::migration renaming table strapi_release_actions_release_links to strapi_release_actions_release_lnk +302ms
⠇ Loading Strapi  strapi::database::migration renaming table up_permissions_role_links to up_permissions_role_lnk +755ms
⠹ Loading Strapi  strapi::database::migration renaming table up_users_role_links to up_users_role_lnk +296ms
⠴ Loading Strapi  strapi::database::migration renaming table articles_websites_links to articles_websites_lnk +305ms
⠏ Loading Strapi  strapi::database::migration renaming table articles_article_category_links to articles_article_category_lnk +300ms
⠸ Loading Strapi  strapi::database::migration renaming table articles_parent_links to articles_parent_lnk +299ms
⠦ Loading Strapi  strapi::database::migration renaming table articles_search_category_links to articles_search_category_lnk +304ms
⠋ Loading Strapi  strapi::database::migration renaming table social_accounts_website_links to social_accounts_website_lnk +301ms
⠼ Loading Strapi  strapi::database::migration renaming table social_cards_article_links to social_cards_article_lnk +298ms
⠇ Loading Strapi  strapi::database::migration renaming table social_cards_account_published_links to social_cards_account_published_lnk +301ms
⠙ Loading Strapi  strapi::database::migration renaming table admin_permissions_role_links to admin_permissions_role_lnk +298ms
⠴ Loading Strapi  strapi::database::migration renaming table admin_users_roles_links to admin_users_roles_lnk +298ms
⠏ Loading Strapi  strapi::database::migration renaming table strapi_api_token_permissions_token_links to strapi_api_token_permissions_token_lnk +308ms
⠹ Loading Strapi  strapi::database::migration renaming table strapi_transfer_token_permissions_token_links to strapi_transfer_token_permissions_token_lnk +299ms