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

feat: remove pix label

parent 44998445
Branches
Tags
2 merge requests!345V2.4.2,!339Resolve "[Label fiche structure + mon compte + filtre carto + onboarding] - supprimer Pix"
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.
Please register or to comment