// // Migration file template // 1 - Remove this top section // 2 - Uncomment the rest of the file // 3 - Customize for your use case // // Required imports // import { Connection } from 'mongoose'; // import { LoggerSharedService } from '../../src/common/services/logger.service'; // import { MyEntitySchema } from '../../src//schemas/myEntity.schema'; // import { data } from '../seed-data/'; /** * Add custom imports here */ // import { MyEntitySchema } from '../../../MyEntitys/schemas/MyEntity.schema'; // Import model schema as needed // import { data } from '../seed-data/seed-data-dev'; // Import seed data as needed /** * Make any changes you need to make to the database here */ // export async function up(connection: Connection, bffLoggerService: LoggerSharedService) { // const news = data.entities; // const = connection.model('', Schema); // const completed = await .collection.insertMany(news); // bffLoggerService.log(`UP script completed. ${completed ? JSON.stringify(completed.result) : 'no results'}`); // } /** * Make any changes that UNDO the up function side effects here (if possible) */ // export async function down(connection: Connection, bffLoggerService: LoggerSharedService) { // const news = data.entities; // const idsToRemove = news.map(item => item.id); // const = connection.model('', Schema); // const completed = await .collection.deleteMany({ id: { $in: idsToRemove } }); // bffLoggerService.log(`DOWN script completed. ${completed ? JSON.stringify(completed.result) : 'no results'}`); // }