-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed formatting, bumped all dependencies to newer versions
- Loading branch information
Showing
14 changed files
with
152 additions
and
530 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
const { withSuperjson } = require('next-superjson') | ||
const { withSuperjson } = require("next-superjson"); | ||
|
||
module.exports = withSuperjson()({}) | ||
module.exports = withSuperjson()({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,70 @@ | ||
import { PrismaClient, Prisma } from '@prisma/client' | ||
import { PrismaClient, Prisma } from "@prisma/client"; | ||
|
||
const prisma = new PrismaClient() | ||
const prisma = new PrismaClient(); | ||
|
||
const userData: Prisma.UserCreateInput[] = [ | ||
{ | ||
name: 'Alice', | ||
email: 'alice@prisma.io', | ||
name: "Alice", | ||
email: "alice@prisma.io", | ||
posts: { | ||
create: [ | ||
{ | ||
title: 'Join the Prisma Slack', | ||
content: 'https://slack.prisma.io', | ||
title: "Join the Prisma Slack", | ||
content: "https://slack.prisma.io", | ||
published: true, | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
name: 'Nilu', | ||
email: 'nilu@prisma.io', | ||
name: "Nilu", | ||
email: "nilu@prisma.io", | ||
posts: { | ||
create: [ | ||
{ | ||
title: 'Follow Prisma on Twitter', | ||
content: 'https://www.twitter.com/prisma', | ||
title: "Follow Prisma on Twitter", | ||
content: "https://www.twitter.com/prisma", | ||
published: true, | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
name: 'Mahmoud', | ||
email: 'mahmoud@prisma.io', | ||
name: "Mahmoud", | ||
email: "mahmoud@prisma.io", | ||
posts: { | ||
create: [ | ||
{ | ||
title: 'Ask a question about Prisma on GitHub', | ||
content: 'https://www.github.com/prisma/prisma/discussions', | ||
title: "Ask a question about Prisma on GitHub", | ||
content: "https://www.github.com/prisma/prisma/discussions", | ||
published: true, | ||
}, | ||
{ | ||
title: 'Prisma on YouTube', | ||
content: 'https://pris.ly/youtube', | ||
title: "Prisma on YouTube", | ||
content: "https://pris.ly/youtube", | ||
}, | ||
], | ||
}, | ||
}, | ||
] | ||
]; | ||
|
||
async function main() { | ||
console.log(`Start seeding ...`) | ||
console.log(`Start seeding ...`); | ||
for (const u of userData) { | ||
const user = await prisma.user.create({ | ||
data: u, | ||
}) | ||
console.log(`Created user with id: ${user.id}`) | ||
}); | ||
console.log(`Created user with id: ${user.id}`); | ||
} | ||
console.log(`Seeding finished.`) | ||
console.log(`Seeding finished.`); | ||
} | ||
|
||
main() | ||
.then(async () => { | ||
await prisma.$disconnect() | ||
await prisma.$disconnect(); | ||
}) | ||
.catch(async (e) => { | ||
console.error(e) | ||
await prisma.$disconnect() | ||
process.exit(1) | ||
}) | ||
console.error(e); | ||
await prisma.$disconnect(); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.