Skip to content

Commit

Permalink
hotfixes constraint error
Browse files Browse the repository at this point in the history
  • Loading branch information
jhmullen committed Oct 19, 2021
1 parent c3a51e6 commit cb5dd6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cms/scripts/migration/db_0.21/profile_meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = function(sequelize, db) {

p.associate = models => {
p.hasMany(models.search, {foreignKey: "cubeName", sourceKey: "cubeName", as: "members", constraints: false});
p.belongsTo(models.profile, {foreignKey: "id", sourceKey: "profile_id", as: "profile"});
p.belongsTo(models.profile, {foreignKey: "id", sourceKey: "profile_id", as: "profile", constraints: false});
};

return p;
Expand Down
2 changes: 1 addition & 1 deletion packages/cms/src/db/profile_meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = function(sequelize, db) {

p.associate = models => {
p.hasMany(models.search, {foreignKey: "cubeName", sourceKey: "cubeName", as: "members", constraints: false});
p.belongsTo(models.profile, {foreignKey: "id", sourceKey: "profile_id", as: "profile"});
p.belongsTo(models.profile, {foreignKey: "id", sourceKey: "profile_id", as: "profile", constraints: false});
};

return p;
Expand Down

0 comments on commit cb5dd6b

Please sign in to comment.