x
This commit is contained in:
1 parent
c23a4723ed
commit
07e9413a6b
13 files changed
+497
-94
No files matched your search
@@ -0,0 +1,10 @@
|
||||
import prisma from './src/lib/prisma';
|
||||
async function main() {
|
||||
const brand = await prisma.productBrand.findFirst({ where: { name: 'DDC' } });
|
||||
let cat = await prisma.category.findFirst({ where: { name: 'Sprockets' } });
|
||||
if (!cat) {
|
||||
cat = await prisma.category.create({ data: { name: 'Sprockets' } });
|
||||
}
|
||||
console.log(JSON.stringify({brandId: brand?.id, catId: cat.id}));
|
||||
}
|
||||
main().catch(console.error).finally(() => process.exit(0));
|
||||
Reference in new issue
Block a user