Skip to content
Snippets Groups Projects
Commit 2877f904 authored by Rémi PAILHAREY's avatar Rémi PAILHAREY :fork_knife_plate:
Browse files

Merge branch...

Merge branch '39-label-fiche-structure-mon-compte-filtre-carto-onboarding-supprimer-pix-2' into 'dev'

Resolve "[Label fiche structure + mon compte + filtre carto + onboarding] - supprimer Pix"

See merge request !339
parents 44998445 b306108e
No related branches found
No related tags found
Loading
import { Db } from 'mongodb';
import { getDb } from '../migrations-utils/db';
export const up = async () => {
const db: Db = await getDb();
await db.collection('categories').updateOne(
{ id: 'labelsQualifications' },
{
$pull: { modules: { id: 'pix' } },
}
);
await db.collection('structures').updateMany({ 'categories.labelsQualifications': 'pix' }, {
$pull: { 'categories.labelsQualifications': 'pix' },
} as unknown);
console.log('Updated : Pix label removed');
};
export const down = async () => {
const db: Db = await getDb();
await db.collection('categories').updateOne(
{ id: 'labelsQualifications' },
{
$push: { modules: { id: 'pix', name: 'Pix' } },
}
);
console.log('Downgraded : Pix label added');
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment