fix: rename DistribusiUmur.kelompok to rentangUmur to match UI/API
- Update Prisma schema: kelompok -> rentangUmur - Update seed data JSON: kelompok -> rentangUmur - Update seeder file: use rentangUmur field - This fixes the empty data issue in distribusi-umur admin page Note: Run 'bunx prisma db push' to apply schema migration Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -10,18 +10,18 @@ export async function seedDistribusiUmur() {
|
||||
await prisma.distribusiUmur.upsert({
|
||||
where: { id: item.id },
|
||||
update: {
|
||||
kelompok: item.kelompok,
|
||||
rentangUmur: item.rentangUmur,
|
||||
jumlah: item.jumlah,
|
||||
tahun: item.tahun,
|
||||
},
|
||||
create: {
|
||||
id: item.id,
|
||||
kelompok: item.kelompok,
|
||||
rentangUmur: item.rentangUmur,
|
||||
jumlah: item.jumlah,
|
||||
tahun: item.tahun,
|
||||
},
|
||||
});
|
||||
console.log(` Kelompok ${item.kelompok}: ${item.jumlah} jiwa`);
|
||||
console.log(` Rentang ${item.rentangUmur}: ${item.jumlah} jiwa`);
|
||||
}
|
||||
|
||||
console.log("Distribusi Umur seed selesai");
|
||||
|
||||
Reference in New Issue
Block a user