How to upgrade from Strapi v4.15.0 to v.4.23.0?

I’m updating like you from 4.15.5 to 4.23.0 and having this database error:

"up_permissions_role_links" add constraint "up_permissions_role_links_fk" foreign key ("permission_id") references "up_permissions" ("id") on delete CASCADE - there is no unique constraint matching given keys for referenced table "up_permissions"

i did a migration to modify the up_permissions table but it didn’t work. Does anyone know how to fix it?