Fixed prisma.schema, package.json and prisma seed.ts

This commit is contained in:
2024-10-05 20:23:27 +00:00
parent 9001c47410
commit c634b8e73f
17 changed files with 755 additions and 896 deletions

View File

@ -141,7 +141,7 @@ const equipmentData = [
"undervognsbehandlet"
];
const brandData = [
/* const brandData = [
"Abarth", "AC", "Adler", "Aiways", "Alfa Romeo", "Alpina", "Aston Martin",
"Auburn", "Audi", "Austin", "Austin Healey", "Auto Union", "Bentley",
"BMW", "Buick", "BYD", "Cadillac", "CF Moto", "Chevrolet", "Chrysler",
@ -157,7 +157,7 @@ const brandData = [
"Seat", "Seres", "Singer", "Skoda", "Smart", "SsangYong", "Studebaker",
"Subaru", "Suzuki", "Saab", "Tesla", "Toyota", "Triumph", "Vauxhall",
"Volvo", "Voyah", "VW", "Wolseley", "Xpeng", "Yugo"
];
]; */
async function main() {
for (const equipment of equipmentData) {
@ -166,18 +166,8 @@ async function main() {
});
}
console.log('Equipment data seeded');
// Seed Brands
for (const brand of brandData) {
await prisma.brand.create({
data: { name: brand },
});
}
console.log('Brand data seeded');
}
main()
.catch((e) => {
console.error(e);