This Gist provides a PostgreSQL migration script to safely migrate a Strapi database from Strapi v4.4.7 to Strapi v5.x (tested with v5.33.4).
It is designed to be executed before the first build/start of a Strapi V5 project when reusing a database dump coming from V4.