-
Notifications
You must be signed in to change notification settings - Fork 0
/
seed.js
34 lines (28 loc) · 787 Bytes
/
seed.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
async function main() {
const newUser = await prisma.user.create({
data: {
Profile:{
create: {
email: "arogya.bic@gmail.com",
password: "123456",
// name: "Arogya bicpuria",
bio: "I am arogya bicpuria",
image: "https://www.google.com",
phoneNumber: "8989748248",
}
}
// ...other fields...
},
});
console.log('Created new user: ', newUser);
// Add additional logic to create conversations, messages, etc.
}
main()
.catch((e) => {
throw e;
})
.finally(async () => {
await prisma.$disconnect();
});