Pavlo Strunkin
05/23/2020, 10:27 AMRyan
05/25/2020, 9:21 AMimport { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient({
log: ['query'],
})
async function main() {
// fetch all data
// transfer the data from the fields to the other field
}
main()
.catch((e) => console.error('e', e))
.finally(async () => await prisma.disconnect())
Then you can directly run this seed file, via node seed.js
or npx ts-node seed.ts
if using TypeScript.Pavlo Strunkin
05/26/2020, 7:32 PM