Browse Source

feat: add deletion of existing ads modules before seeding new data

Dave 2 tháng trước cách đây
mục cha
commit
ef4e5640f3
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      prisma/mongo/seed.ts

+ 2 - 0
prisma/mongo/seed.ts

@@ -85,6 +85,8 @@ async function main() {
     },
   ];
 
+  await prisma.adsModule.deleteMany();
+
   for (const module of adsModules) {
     await prisma.adsModule.create({
       data: module,