System Information
Strapi Version : 4.15.5
Operating System : ubuntu
Database : mysql:8.0
Node Version : 18
NPM Version : -
Yarn Version : -
Hello!
I’ve just updated Strapi to 4.15.5 and got this error:
MigrationError: Migration 2023.06.14T00.00.00.update-file-paths.js (up) failed: Original error: update `files` set `folder_path` = '/' where `folder_path` is null - ER_BAD_FIELD_ERROR: Unknown column 'folder_path' in 'where clause'
If I do not executing migration script then I see broken images in admin panel, exactly as described at
Please help!
Manually execute
UPDATE files SET folder_path = "/"
Now it is OK
see
opened 11:38AM - 07 Jul 23 UTC
closed 02:24PM - 14 Jul 23 UTC
issue: bug
severity: critical
status: confirmed
flag: 💥 Breaking change
source: core:upload
flag: EE
<!--
Hello 👋 Thank you for submitting an issue.
Before you start, please mak… e sure your issue is understandable and reproducible.
To make your issue readable make sure you use valid Markdown syntax.
https://guides.github.com/features/mastering-markdown/
Please ensure you have also read and understand the contributing guide.
https://github.com/strapi/strapi/blob/main/CONTRIBUTING.md#reporting-an-issue
-->
## Bug report
### Required System information
- Node.js version: v16.20.1
- NPM version: 8.19.4
- Strapi version: v4.11.4
- Database: SQLite
- Operating system: MacOS
- Is your project Javascript or Typescript: JS
### Describe the bug
We have all our uploads in the root folder. The DB looks something like this. This project was updated from v3 to v4 before.
![grafik](https://github.com/strapi/strapi/assets/1436383/fee0308d-73f0-4cec-ab5a-28f43213732a)
When we use v.4.11.1 everything works well. We upgraded to v4.11.4 today and the Media Library is empty. All linked images in the content are still visible.
I debugged the problem down to `node_modules/@strapi/plugin-upload/server/controllers/admin-file.js` around line 29. When looking at the query filters, they changed between versions.
v.4.11.1:
![grafik](https://github.com/strapi/strapi/assets/1436383/abb697cf-6a7c-40ac-880b-86c593ffa4ef)
v4.11.4:
![grafik](https://github.com/strapi/strapi/assets/1436383/29493f11-aa33-4085-83c9-c47fae9fd5c6)
I think from the query filters you can see the problem. Was this an intended change? Is there some note on this breaking change?