@chevre/domain 27.0.0-alpha.1 → 27.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,15 +16,9 @@ class ActionRecipeRepo {
|
|
|
16
16
|
return this.actionRecipeModel.findOne({
|
|
17
17
|
'project.id': { $eq: params.project.id },
|
|
18
18
|
'recipeFor.id': { $eq: params.recipeFor.id }
|
|
19
|
-
}, { step: 1, recipeCategory: 1 }
|
|
20
|
-
// { lean: true }
|
|
21
|
-
)
|
|
19
|
+
}, { step: 1, recipeCategory: 1 })
|
|
22
20
|
.lean()
|
|
23
21
|
.exec();
|
|
24
|
-
// if (result === null) {
|
|
25
|
-
// throw new factory.errors.NotFound(this.actionRecipeModel.modelName);
|
|
26
|
-
// }
|
|
27
|
-
// return result;
|
|
28
22
|
}
|
|
29
23
|
async upsertRecipe(savingRecipe) {
|
|
30
24
|
const dateModified = new Date();
|
|
@@ -45,7 +39,6 @@ class ActionRecipeRepo {
|
|
|
45
39
|
};
|
|
46
40
|
await this.actionRecipeModel.updateOne(filter, update, {
|
|
47
41
|
upsert: true
|
|
48
|
-
// includeResultMetadata: true
|
|
49
42
|
})
|
|
50
43
|
.exec();
|
|
51
44
|
}
|
|
@@ -74,26 +74,29 @@ const indexes = [
|
|
|
74
74
|
expireAfterSeconds: 17280000 // 200 days
|
|
75
75
|
}
|
|
76
76
|
],
|
|
77
|
-
[
|
|
78
|
-
{ dateCreated: -1 },
|
|
79
|
-
{ name: 'searchByDateCreated' }
|
|
80
|
-
],
|
|
81
|
-
[
|
|
82
|
-
{ 'project.id': 1, dateCreated: -1 },
|
|
83
|
-
{ name: 'searchByProjectId' }
|
|
84
|
-
],
|
|
85
|
-
[
|
|
86
|
-
{ 'recipeFor.id': 1, dateCreated: -1 },
|
|
87
|
-
{ name: 'searchByRecipeForId' }
|
|
88
|
-
],
|
|
89
77
|
// テスト環境ではユニークインデックス適用済(2026-08-21~)
|
|
78
|
+
// 本番環境でもユニークインデックス適用済(2026-08-29~)
|
|
79
|
+
[
|
|
80
|
+
{ 'recipeFor.id': 1 }, // support unique index(2026-08-21~)
|
|
81
|
+
{
|
|
82
|
+
unique: true,
|
|
83
|
+
name: 'uniqueActionId'
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
// uniqueActionIdを適用したのでおそらく不要(2026-08-30~)
|
|
87
|
+
// [
|
|
88
|
+
// { 'recipeFor.id': 1, dateCreated: -1 },
|
|
89
|
+
// { name: 'searchByRecipeForId' }
|
|
90
|
+
// ],
|
|
91
|
+
// 以下、汎用検索系インデックスもひとまず廃止(2026-08-30~)
|
|
92
|
+
// [
|
|
93
|
+
// { dateCreated: -1 },
|
|
94
|
+
// { name: 'searchByDateCreated' }
|
|
95
|
+
// ],
|
|
90
96
|
// [
|
|
91
|
-
// { '
|
|
92
|
-
// {
|
|
93
|
-
//
|
|
94
|
-
// name: 'uniqueActionId'
|
|
95
|
-
// }
|
|
96
|
-
// ]
|
|
97
|
+
// { 'project.id': 1, dateCreated: -1 },
|
|
98
|
+
// { name: 'searchByProjectId' }
|
|
99
|
+
// ],
|
|
97
100
|
];
|
|
98
101
|
exports.indexes = indexes;
|
|
99
102
|
/**
|
package/package.json
CHANGED