* feat(db): migrate seed.js to typescript * feat(db): change seed command * Update changelog
25 lines
428 B
TypeScript
25 lines
428 B
TypeScript
import { PrismaClient } from '@prisma/client';
|
|
|
|
const prisma = new PrismaClient();
|
|
|
|
async function main() {
|
|
await prisma.tag.createMany({
|
|
data: [
|
|
{
|
|
id: '4452656d-9fa4-4bd0-ba38-70492e31d180',
|
|
name: 'EMERGENCY_FUND'
|
|
}
|
|
],
|
|
skipDuplicates: true
|
|
});
|
|
}
|
|
|
|
main()
|
|
.catch((e) => {
|
|
console.error(e);
|
|
process.exit(1);
|
|
})
|
|
.finally(async () => {
|
|
await prisma.$disconnect();
|
|
});
|