File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
docusaurus/docs/dev-docs/migration/v4 Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -78,13 +78,17 @@ const getLinkTables = ({ strapi }) => {
7878 const contentTypes = strapi .db .metadata ;
7979 const tablesToUpdate = {};
8080
81- contentTypes .forEach (contentType => {
81+ contentTypes .forEach (( contentType ) => {
8282 // Get attributes
8383 const attributes = contentType .attributes ;
8484
8585 // For each relation type, add the joinTable name to tablesToUpdate
86- Object .values (attributes).forEach (attribute => {
87- if (attribute .type === ' relation' && attribute .joinTable ) {
86+ Object .values (attributes).forEach ((attribute ) => {
87+ if (
88+ attribute .type === ' relation' &&
89+ attribute .joinTable &&
90+ ! attribute .relation .startsWith (' morph' ) // Ignore polymorphic relations
91+ ) {
8892 tablesToUpdate[attribute .joinTable .name ] = attribute .joinTable ;
8993 }
9094 });
You can’t perform that action at this time.
0 commit comments