strapi icon indicating copy to clipboard operation
strapi copied to clipboard

Strapi upgrade removes roles and locales

Open shoaibmerchant opened this issue 2 years ago • 0 comments

Bug report

Required System information

  • Node.js version: 14.19.3
  • NPM version: 6.14.17
  • Strapi version: 4.4.3
  • Database: MySQL on RDS
  • Operating system: Amazon AMI

Describe the bug

  1. We were running Strapi 4.2.0, and also relying on the i18n plugin for managing locale wise content
  2. We decided to upgrade to 4.4.3 today for a search issue that has recently been fixed.
  3. When we start the server after npm install and build, we could see following issues - 3.1. We were using user & permissions plugin and found that all permissions for the Public User were deselected. So all APIs started throwing 403. 3.2. The locales got deleted other than the default (en), and all content tables with locale column got set to null.
  4. Note - we did not run npm run develop and rather ran the upgrade directly on CI on a staging environment. Not sure if that makes any difference.
  5. In the logs I also see an entry -
 Error: ER_NO_SUCH_TABLE: Table 'test_db.upload_folders' doesn't exist

Steps to reproduce the behavior

  1. Create a strapi application with 4.2.0, use user permissions plugin and i18n plugin
  2. Migrate to 4.4.3, check if database is migrated successfully.

Expected behavior

Strapi should have updated to 4.4.3 and all database should have migrated. Also i suggest that the locales foreign key should not be SET NULL but NO ACTION. Open for comments.

Screenshots

Attached logs - web.stdout.log

Code snippets

If applicable, add code samples to help explain your problem.

Additional context

Add any other context about the problem here.

shoaibmerchant avatar Oct 14 '22 15:10 shoaibmerchant