Hi,
I'm working on migrating a strapi project (on postgres) from v3 to v4.
After using codemods succesfully to migrate the code, I had to change some things in the migration scripts:
1- User tables had different names (I couldn't find any references to the current names. maybe in earlier versions?)
2- In a SQL query, I added double quotes around the table name so it supports names with -.
3- I applied pluralize.singular for uids like api::pluralname.pluralname in the same way codemods does. Now the field related_type on table files_related_morphs gets migrated correctly and I don't lose the relation to media uploads.
Number 3 is probably necessary only if the code was migrated using codemods, so maybe the script needs to check that somehow.
Let me know if you need any extra info.
Hi, I'm working on migrating a strapi project (on postgres) from v3 to v4. After using codemods succesfully to migrate the code, I had to change some things in the migration scripts: 1- User tables had different names (I couldn't find any references to the current names. maybe in earlier versions?) 2- In a SQL query, I added double quotes around the table name so it supports names with
-
. 3- I appliedpluralize.singular
for uids likeapi::pluralname.pluralname
in the same way codemods does. Now the fieldrelated_type
on tablefiles_related_morphs
gets migrated correctly and I don't lose the relation to media uploads.Number 3 is probably necessary only if the code was migrated using codemods, so maybe the script needs to check that somehow. Let me know if you need any extra info.