New Documentation release: Strapi v4.5.0

Hello everyone! :wave:
Here’s everything new in this week’s documentation deployment:

New :tada:

Strapi v4.5.0 brings enhancements to relations and the marketplace:

  • Relations have been moved from the sidebar to the main content of the Edit view in the Content Manager for easier editing. More improvements are coming to relations soon, so stay tuned!
  • The in-app marketplace features several new features, including the ability to sort and filter plugins and providers and check their compatibility with your current Strapi version.

Improvements and community contributions :sparkles:

Hi everyone!

Oddly enough, I had several duplicated records in my “_links” tables, probably by some messed up sync/migration I had in the past.

Before 4.5.0, the instance worked fine, as we hadn’t unique indexes in “_links” tables. Now with 4.5.0, I had to delete all duplicated references before migrating. I’ve done one query for each “_links” table.

Leaving an example here, change “select *” to “delete” and don’t forget to backup and test locally before!

-- delete
select * from admin_permissions_role_links t
where not in (
    SELECT max(
    FROM admin_permissions_role_links t2
    group by t2.permission_id, t2.role_id

Example errors for search engines:

[2022-11-14 23:15:36.029] debug: ⛔️ Server wasn't able to start properly.
[2022-11-14 23:15:36.030] error: alter table "admin_permissions_role_links" add constraint "admin_permissions_role_links_unique" unique ("permission_id", "role_id") - could not create unique index "admin_permissions_role_links_unique"

Thanks for reporting. The product team is working on a fix for MySQL 8 and we’ll release a migration guide soon, maybe is this related? I’ll keep you posted :slight_smile:

1 Like

I’m running into a very similar issue with PostgresDB when migrating from 4.3.4 to 4.5.3. Sadly, the issue only showed up in our production DB, and not the dev or staging environments.

[2022-12-13 10:04:52.100] debug: ⛔️ Server wasn't able to start properly.
[2022-12-13 10:04:52.102] error: alter table "admin_permissions_role_links" add constraint "admin_permissions_role_links_unique" unique ("permission_id", "role_id") - could not create unique index "admin_permissions_role_links_unique"

Ahh… I just saw this issue mentioned in the migration-guide-4.4.5-to-4.5.1