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

Merge branch 'feat/US134-rename-caf' into 'dev'

rename "Accompagnement CAF" to "CAF"

See merge request web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_server!142
parents 9f2cb1b9 90e106f5
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