Strapi 5 upgrade error from v4 to v5.4+
<!--
Hello 👋 Thank you for submitting an issue.

Before you start, please make 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

<!-- Please ensure you are using the Node LTS version (18, 20, or 22) -->
<!-- Strapi v3 is no longer supported, please update to Strapi v4 -->
<!-- If you are reporting a frontend bug please provide error logs after setting STRAPI_ENFORCE_SOURCEMAPS=true in your .env -->
<!-- This environment variable makes frontend errors easier to read and trace -->

- Strapi version: 4.25.x to 5.4+, 
- Database: Postgres
- Operating system: Linux
- Is your project Javascript or Typescript: Javascript

<!-- Did you know you can run `yarn strapi report` or `npm run strapi report` to get this information easier? -->

### Describe the bug

When upgrading Strapi from v4 to Strapi 5, users encountered issues with part of the process, presumably when database tables were being modified from v4 schema to Strapi 5 schema and the error below was thrown:

```bash
[2024-12-09 12:55:48] [2024-12-09 12:55:48.957] debug: ⛔️ Server wasn't able to start properly.
[2024-12-09 12:55:48] [2024-12-09 12:55:48.968] error: create index "admin_permissions_role_links_fk" on "public"."admin_permissions_role_links" ("permission_id") - relation "admin_permissions_role_links_fk" already exists
[2024-12-09 12:55:48] error: create index "admin_permissions_role_links_fk" on "public"."admin_permissions_role_links" ("permission_id") - relation "admin_permissions_role_links_fk" already exists
[2024-12-09 12:55:48]     at Parser.parseErrorMessage (/home/app/docroot/node_modules/pg-protocol/dist/parser.js:283:98)
[2024-12-09 12:55:48]     at Parser.handlePacket (/home/app/docroot/node_modules/pg-protocol/dist/parser.js:122:29)
[2024-12-09 12:55:48]     at Parser.parse (/home/app/docroot/node_modules/pg-protocol/dist/parser.js:35:38)
[2024-12-09 12:55:48]     at TLSSocket.<anonymous> (/home/app/docroot/node_modules/pg-protocol/dist/index.js:11:42)
[2024-12-09 12:55:48]     at TLSSocket.emit (node:events:517:28)
[2024-12-09 12:55:48]     at TLSSocket.emit (node:domain:489:12)
[2024-12-09 12:55:48]     at addChunk (node:internal/streams/readable:368:12)
[2024-12-09 12:55:48]     at readableAddChunk (node:internal/streams/readable:341:9)
[2024-12-09 12:55:48]     at Readable.push (node:internal/streams/readable:278:10)
[2024-12-09 12:55:48]     at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)
```

### Steps to reproduce the behavior (according to what we know currently)

1. Upgrade code base to Strapi 5
2. Connect to a v4 database (with existing data)
3. Attempt to start your app
4. See error

### Expected behavior

Ideally, a successful upgrade


### Additional context

So far, this seems to be happening to users who have existing data in their apps, from what I read: blank applications seem to go through the upgrade process just fine. 
