Skip to content
Snippets Groups Projects
Commit 90e106f5 authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

feat(digital helps): rename "Accompagnement CAF" to "CAF"

parent 9f2cb1b9
No related branches found
No related tags found
2 merge requests!1771.17.0,!142rename "Accompagnement CAF" to "CAF"
import { Db } from 'mongodb';
import { getDb } from '../migrations-utils/db';
export const up = async () => {
const db: Db = await getDb();
await db
.collection('categoriesaccompagnements')
.updateOne(
{ id: 'proceduresAccompaniment', 'modules.id': 'accompagnantCaf' },
{ $set: { 'modules.$.text': 'CAF' } }
);
console.log(
'Updated done: "Accompagnement CAF" to "CAF" from collection "categoriesAccompanements" with document id "proceduresAccompaniment"'
);
};
export const down = async () => {
const db: Db = await getDb();
await db
.collection('categoriesaccompagnements')
.updateOne(
{ id: 'proceduresAccompaniment', 'modules.id': 'accompagnantCaf' },
{ $set: { 'modules.$.text': 'Accompagnement CAF' } }
);
console.log(
'Downgraded "CAF" to "Accompagnement CAF" from collection "categoriesAccompanements" with document id "proceduresAccompaniment"'
);
};
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