improvement: attachment selection for lab dispatch added. attachment preview added to cases feature.
This commit is contained in:
@@ -14,8 +14,12 @@ const prisma = new PrismaClient();
|
||||
|
||||
async function main() {
|
||||
const counts = {
|
||||
labCaseTaskStatusEvents: await prisma.labCaseTaskStatusEvent.count(),
|
||||
labCaseComments: await prisma.labCaseComment.count(),
|
||||
labCaseAttachments: await prisma.labCaseAttachment.count(),
|
||||
labCaseTasks: await prisma.labCaseTask.count(),
|
||||
labCaseSends: await prisma.labCaseSend.count(),
|
||||
labCaseToothProsthesis: await prisma.labCaseToothProsthesis.count(),
|
||||
labCaseDetails: await prisma.labCaseDetail.count(),
|
||||
labCases: await prisma.labCase.count(),
|
||||
attachments: await prisma.treatmentDetailAttachment.count(),
|
||||
@@ -27,8 +31,12 @@ async function main() {
|
||||
console.log('Current row counts:', counts);
|
||||
|
||||
await prisma.$transaction([
|
||||
prisma.labCaseTaskStatusEvent.deleteMany(),
|
||||
prisma.labCaseComment.deleteMany(),
|
||||
prisma.labCaseAttachment.deleteMany(),
|
||||
prisma.labCaseTask.deleteMany(),
|
||||
prisma.labCaseSend.deleteMany(),
|
||||
prisma.labCaseToothProsthesis.deleteMany(),
|
||||
prisma.labCaseDetail.deleteMany(),
|
||||
prisma.labCase.deleteMany(),
|
||||
prisma.treatmentDetailAttachment.deleteMany(),
|
||||
@@ -37,7 +45,9 @@ async function main() {
|
||||
prisma.appointment.deleteMany(),
|
||||
]);
|
||||
|
||||
console.log('✅ Cleared appointments, treatments, lab cases, tasks, and attachments.');
|
||||
console.log(
|
||||
'✅ Cleared appointments, treatments, lab cases, tasks, comments, attachments, and related rows.',
|
||||
);
|
||||
}
|
||||
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user