@bprotsyk/aso-core 1.2.61 → 1.2.63
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.
- package/lib/flash/flash-app.js +5 -3
- package/package.json +1 -1
- package/src/flash/flash-app.ts +6 -5
package/lib/flash/flash-app.js
CHANGED
|
@@ -150,7 +150,7 @@ exports.FlashAppSchema = new mongoose_1.Schema({
|
|
|
150
150
|
});
|
|
151
151
|
// TODO app type (casino / fin)
|
|
152
152
|
async function updateSchemaAndMoveValue(model) {
|
|
153
|
-
|
|
153
|
+
await model.syncIndexes();
|
|
154
154
|
let pipelineStage = [
|
|
155
155
|
{
|
|
156
156
|
// $set: {
|
|
@@ -159,12 +159,14 @@ async function updateSchemaAndMoveValue(model) {
|
|
|
159
159
|
// apartment: "$employee_addr.apartment",
|
|
160
160
|
// employee_addr: "$$REMOVE"
|
|
161
161
|
// },
|
|
162
|
-
$
|
|
163
|
-
"generationOptions.keyDeveloperName":
|
|
162
|
+
$set: {
|
|
163
|
+
"generationOptions.keyDeveloperName": "$$REMOVE",
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
];
|
|
167
167
|
let aggregation = model.aggregate(pipelineStage);
|
|
168
|
+
await model.collection.dropIndex("generationOptions.keyDeveloperName_1");
|
|
169
|
+
await model.collection.dropIndex("generationOptions.keyPassword_1");
|
|
168
170
|
await aggregation.exec();
|
|
169
171
|
// const updateOperation: UpdateQuery<IFlashApp> = {
|
|
170
172
|
// $set: {
|
package/package.json
CHANGED
package/src/flash/flash-app.ts
CHANGED
|
@@ -201,7 +201,7 @@ export const FlashAppSchema = new Schema({
|
|
|
201
201
|
})
|
|
202
202
|
// TODO app type (casino / fin)
|
|
203
203
|
export async function updateSchemaAndMoveValue(model: Model<IFlashApp>): Promise<void> {
|
|
204
|
-
|
|
204
|
+
await model.syncIndexes()
|
|
205
205
|
let pipelineStage: PipelineStage[] = [
|
|
206
206
|
{
|
|
207
207
|
// $set: {
|
|
@@ -210,14 +210,15 @@ export async function updateSchemaAndMoveValue(model: Model<IFlashApp>): Promise
|
|
|
210
210
|
// apartment: "$employee_addr.apartment",
|
|
211
211
|
// employee_addr: "$$REMOVE"
|
|
212
212
|
// },
|
|
213
|
-
$
|
|
214
|
-
"generationOptions.keyDeveloperName":
|
|
213
|
+
$set: {
|
|
214
|
+
"generationOptions.keyDeveloperName": "$$REMOVE",
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
]
|
|
218
218
|
|
|
219
219
|
let aggregation = model.aggregate(pipelineStage)
|
|
220
|
-
|
|
220
|
+
await model.collection.dropIndex("generationOptions.keyDeveloperName_1")
|
|
221
|
+
await model.collection.dropIndex("generationOptions.keyPassword_1")
|
|
221
222
|
await aggregation.exec()
|
|
222
223
|
|
|
223
224
|
// const updateOperation: UpdateQuery<IFlashApp> = {
|
|
@@ -258,5 +259,5 @@ export async function updateSchemaAndMoveValue(model: Model<IFlashApp>): Promise
|
|
|
258
259
|
|
|
259
260
|
// await model.updateMany({}, updateOperation);
|
|
260
261
|
|
|
261
|
-
|
|
262
|
+
|
|
262
263
|
}
|