From f401bb8f686063e069033c0f83e66ec6daba5ba5 Mon Sep 17 00:00:00 2001 From: kravchenkodhealth <106426895+kravchenkodhealth@users.noreply.github.com> Date: Mon, 9 Jan 2023 16:41:55 +0200 Subject: [PATCH] [@dhealthdapps/backend] fix(database): rename migration class name, update comments --- .../backend/migrations/005-AddMockedActivities.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/runtime/backend/migrations/005-AddMockedActivities.ts b/runtime/backend/migrations/005-AddMockedActivities.ts index f6047dff..f6fcfa4b 100644 --- a/runtime/backend/migrations/005-AddMockedActivities.ts +++ b/runtime/backend/migrations/005-AddMockedActivities.ts @@ -13,20 +13,20 @@ import { Db } from "mongodb"; import mongoose from "mongoose"; /** * @label DATABASE - * @class AddActivityPayoutFields + * @class AddMockedActivities * @description This migration consists in one or more database * schema and/or data updates. The following tasks are run: - * - Update the `activities` collection by creating new fields - * including: `payoutState` and `queuePosition`. + * - Add mocked activity with hardcoded + * data to fill `activities` collection + * with data. Without posting activity in Strava. * - * @since v0.4.1 + * @since v0.6.0 */ -export class Test implements MigrationInterface { +export class AddMockedActivities implements MigrationInterface { async up(db: Db): Promise { // uses collection `activities` const collection = db.collection("activities"); - // update many `activities` documents such that - // - the `payoutState` field contains 0 (Not_Started) + // insert one `activity` document await collection.insertOne({ _id: new mongoose.Types.ObjectId("63529c31904bb2acae61d82a"), address: "NBZTCWH3FCWBEPX2MR2GLDHHIVBKWGQWDEP6C7Q",