x
This commit is contained in:
1 parent
6a35dcf955
commit
b362f5cadf
10 files changed
+335
-78
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
async function main() {
|
||||
await prisma.product.updateMany({
|
||||
data: {
|
||||
price: null,
|
||||
},
|
||||
});
|
||||
console.log('Successfully set all Product prices to null');
|
||||
}
|
||||
|
||||
main()
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
})
|
||||
.finally(async () => {
|
||||
await prisma.$disconnect();
|
||||
});
|
||||
Reference in new issue
Block a user