@bprotsyk/aso-core 1.2.60 → 1.2.62
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 +3 -4
- package/package.json +1 -1
- package/src/flash/flash-app.ts +4 -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: {
|
|
@@ -165,6 +165,8 @@ async function updateSchemaAndMoveValue(model) {
|
|
|
165
165
|
}
|
|
166
166
|
];
|
|
167
167
|
let aggregation = model.aggregate(pipelineStage);
|
|
168
|
+
model.collection.dropIndex("generationOptions.keyDeveloperName_1");
|
|
169
|
+
model.collection.dropIndex("generationOptions.keyPassword_1");
|
|
168
170
|
await aggregation.exec();
|
|
169
171
|
// const updateOperation: UpdateQuery<IFlashApp> = {
|
|
170
172
|
// $set: {
|
|
@@ -200,8 +202,5 @@ async function updateSchemaAndMoveValue(model) {
|
|
|
200
202
|
// ],
|
|
201
203
|
// };
|
|
202
204
|
// await model.updateMany({}, updateOperation);
|
|
203
|
-
console.log(util.inspect(await model.collection.indexes(), { showHidden: false, depth: null }));
|
|
204
|
-
console.log("–––––––––––––––––");
|
|
205
|
-
console.log(util.inspect(model.schema.indexes(), { showHidden: false, depth: null }));
|
|
206
205
|
}
|
|
207
206
|
exports.updateSchemaAndMoveValue = updateSchemaAndMoveValue;
|
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: {
|
|
@@ -217,7 +217,8 @@ export async function updateSchemaAndMoveValue(model: Model<IFlashApp>): Promise
|
|
|
217
217
|
]
|
|
218
218
|
|
|
219
219
|
let aggregation = model.aggregate(pipelineStage)
|
|
220
|
-
|
|
220
|
+
model.collection.dropIndex("generationOptions.keyDeveloperName_1")
|
|
221
|
+
model.collection.dropIndex("generationOptions.keyPassword_1")
|
|
221
222
|
await aggregation.exec()
|
|
222
223
|
|
|
223
224
|
// const updateOperation: UpdateQuery<IFlashApp> = {
|
|
@@ -258,7 +259,5 @@ export async function updateSchemaAndMoveValue(model: Model<IFlashApp>): Promise
|
|
|
258
259
|
|
|
259
260
|
// await model.updateMany({}, updateOperation);
|
|
260
261
|
|
|
261
|
-
|
|
262
|
-
console.log("–––––––––––––––––")
|
|
263
|
-
console.log(util.inspect(model.schema.indexes(), { showHidden: false, depth: null }))
|
|
262
|
+
|
|
264
263
|
}
|