You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Strapi database migration example (bottom of the page) references the entityService which is deprecated in Strapi 5 and users should use the documentService.
Additional context
No response
Suggested improvements or fixes
This code example:
module.exports={asyncup(){awaitstrapi.db.transaction(async()=>{// Your migration code here// Example: creating new entriesawaitstrapi.entityService.create('api::article.article',{data: {title: 'My Article',},});// Example: custom service methodawaitstrapi.service('api::article.article').updateRelatedArticles();});},};
Link to the documentation page or resource
https://docs.strapi.io/dev-docs/database-migrations#using-strapi-instance-for-migrations
Describe the bug
The Strapi database migration example (bottom of the page) references the entityService which is deprecated in Strapi 5 and users should use the documentService.
Additional context
No response
Suggested improvements or fixes
This code example:
Should be changed to use the documentService (likewise for typescript): https://docs.strapi.io/dev-docs/api/document-service
Related issue(s)/PR(s)
Support Ticket TID10727
The text was updated successfully, but these errors were encountered: