Skip to content
Snippets Groups Projects
Commit 507fd3f1 authored by Etienne LOUPIAS's avatar Etienne LOUPIAS
Browse files

Merge branch '579-cartographie-filtres-cartographie' into 'dev'

579 cartographie filtres cartographie

See merge request !403
parents 28c62d99 e701ec23
Loading
import { getDb } from '../migrations-utils/db';
export const up = async () => {
try {
const db = await getDb();
const newCategory = {
modules: [
{
id: 'True',
name: 'hasUserWithAppointmentDN',
},
],
name: 'Demande de RDV',
theme: 'Pas de modale',
id: 'hasUserWithAppointmentDN',
};
await db.collection('categories').insertOne(newCategory);
console.log(`Update done: New category 'hasUserWithAppointmentDN' added successfully.`);
} catch (error) {
console.error(`Error while creating the new category 'hasUserWithAppointmentDN':`, error);
}
};
export const down = async () => {
try {
const db = await getDb();
await db.collection('categories').deleteOne({ id: 'hasUserWithAppointmentDN' });
console.log(`Downgrade done: removed the 'hasUserWithAppointmentDN' category.`);
} catch (error) {
console.error(`Error while removing the 'hasUserWithAppointmentDN' category:`, error);
}
};
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