diff --git a/migrations/20211212200953-fulltext-search.cjs b/migrations/20211212200953-fulltext-search.cjs index 05cf1687..f5fb9998 100644 --- a/migrations/20211212200953-fulltext-search.cjs +++ b/migrations/20211212200953-fulltext-search.cjs @@ -15,6 +15,7 @@ module.exports = { projectLink, projectDeveloper, sector, + coveredByNDC, projectType, projectTags, ndcInformation, diff --git a/migrations/20211219182106-sqlite-triggers-projects.cjs b/migrations/20211219182106-sqlite-triggers-projects.cjs index ecb3557c..b3b52e11 100644 --- a/migrations/20211219182106-sqlite-triggers-projects.cjs +++ b/migrations/20211219182106-sqlite-triggers-projects.cjs @@ -16,6 +16,7 @@ module.exports = { projectLink, projectDeveloper, sector, + coveredByNDC, projectType, projectTags, ndcInformation, @@ -36,6 +37,7 @@ module.exports = { new.projectLink, new.projectDeveloper, new.sector, + new.coveredByNDC, new.projectType, new.projectTags, new.ndcInformation, @@ -68,6 +70,7 @@ module.exports = { projectLink, projectDeveloper, sector, + coveredByNDC, projectType, projectTags, ndcInformation, @@ -88,6 +91,7 @@ module.exports = { new.projectLink, new.projectDeveloper, new.sector, + new.coveredByNDC, new.projectType, new.projectTags, new.ndcInformation, diff --git a/src/models/projects/projects.model.js b/src/models/projects/projects.model.js index c8669e21..a52a428a 100644 --- a/src/models/projects/projects.model.js +++ b/src/models/projects/projects.model.js @@ -126,7 +126,7 @@ class Project extends Model { .filter((col) => !['createdAt', 'updatedAt'].includes(col)) .filter( (col) => - ![ProjectLocation, Label, Issuance, CoBenefit, RelatedProject] + !Project.getAssociatedModels() .map((model) => model.name + 's') .includes(col), ),