@bprotsyk/aso-core 1.2.74 → 1.2.75

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.
@@ -210,10 +210,22 @@ async function updateSchemaAndMoveValue(model) {
210
210
  }
211
211
  ];
212
212
  let aggregation = model.aggregate(pipelineStage);
213
- await model.collection.dropIndex("keitaroData.domainId");
214
- await model.collection.dropIndex("keitaroData.domainName");
215
- await model.collection.dropIndex("plugUrl");
216
- await model.collection.dropIndex("reservePlugUrl");
213
+ try {
214
+ await model.collection.dropIndex("keitaroData.domainId");
215
+ }
216
+ catch (e) { }
217
+ try {
218
+ await model.collection.dropIndex("keitaroData.domainName");
219
+ }
220
+ catch (e) { }
221
+ try {
222
+ await model.collection.dropIndex("plugUrl");
223
+ }
224
+ catch (e) { }
225
+ try {
226
+ await model.collection.dropIndex("reservePlugUrl");
227
+ }
228
+ catch (e) { }
217
229
  // await model.schema.dropIndex("generationOptions.keyPassword_1")
218
230
  await aggregation.exec();
219
231
  const updateOperation = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bprotsyk/aso-core",
3
- "version": "1.2.74",
3
+ "version": "1.2.75",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "scripts": {
@@ -268,11 +268,11 @@ export async function updateSchemaAndMoveValue(model: Model<IFlashApp>): Promise
268
268
  ]
269
269
 
270
270
  let aggregation = model.aggregate(pipelineStage)
271
- await model.collection.dropIndex("keitaroData.domainId")
272
- await model.collection.dropIndex("keitaroData.domainName")
271
+ try { await model.collection.dropIndex("keitaroData.domainId") } catch(e) {}
272
+ try { await model.collection.dropIndex("keitaroData.domainName") } catch(e) {}
273
273
 
274
- await model.collection.dropIndex("plugUrl")
275
- await model.collection.dropIndex("reservePlugUrl")
274
+ try { await model.collection.dropIndex("plugUrl") } catch(e) {}
275
+ try { await model.collection.dropIndex("reservePlugUrl") } catch(e) {}
276
276
 
277
277
  // await model.schema.dropIndex("generationOptions.keyPassword_1")
278
278
  await aggregation.exec()