Skip to content

Commit

Permalink
[@dhealthdapps/backend] fix(database): rename migration class name, u…
Browse files Browse the repository at this point in the history
…pdate comments
  • Loading branch information
kravchenkodhealth authored and evias committed Jan 9, 2023
1 parent dd3a16b commit f401bb8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions runtime/backend/migrations/005-AddMockedActivities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any> {
// 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",
Expand Down

0 comments on commit f401bb8

Please sign in to comment.